From 424c1077138db1dd934c18821e69ee4c069a2237 Mon Sep 17 00:00:00 2001 From: Demetrius Kanios Date: Wed, 17 Jun 2026 12:03:29 -0700 Subject: [PATCH] Add release workflow --- .github/workflows/example-plugin.yml | 3 +- .github/workflows/release.yml | 46 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/example-plugin.yml b/.github/workflows/example-plugin.yml index 1fa6736..2d1de61 100644 --- a/.github/workflows/example-plugin.yml +++ b/.github/workflows/example-plugin.yml @@ -6,7 +6,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - name: Checkout + uses: actions/checkout@v6 with: submodules: true - name: Set up Python diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..db4230e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: Release +on: + push: + tags: + - "v*" + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + release: + name: Build and release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + submodules: true + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install `build` from pip + run: pip install build + + - name: Build + run: python -m build + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + path: dist/pumpkin_api_py* + + - name: Upload artifacts to release + if: startsWith(github.ref, 'refs/tags/v') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + file: dist/pumpkin_api_py* + overwrite: true + file_glob: true