From e38343593f39e8a2dc06bb2c11d7168ee40dd852 Mon Sep 17 00:00:00 2001 From: Demetrius Kanios Date: Mon, 3 Aug 2026 15:55:17 -0700 Subject: [PATCH] Add rolling-release CI --- .github/workflows/release.yml | 38 ++++++++++++++++++++++++++--------- pyproject.toml | 2 +- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c16a9b8..a3043e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,6 @@ name: Release on: push: - tags: - - "v*" workflow_dispatch: permissions: @@ -30,6 +28,26 @@ jobs: - name: Build run: python -m build + - name: Set GITHUB_RELEASE_TAG & ARTIFACT_ID + run: | + set -eux + if [[ '${{ github.ref }}' = refs/tags/v* ]]; then + tag='${{ github.ref }}' + tag="${tag:10}" + artifactID="${tag:1}" + else + tag=CI + artifactID='${{ github.sha }}' + artifactID="${artifactID:0:8}" + fi + echo "GITHUB_RELEASE_TAG=$tag" >> $GITHUB_ENV + echo "ARTIFACT_ID=$artifactID" >> $GITHUB_ENV + + - name: Rename artifacts + run: | + mv dist/pumpkin_api_py-*-py3-none-any.whl dist/pumpkin_api_py-${ARTIFACT_ID}-py3-none-any.whl + mv dist/pumpkin_api_py-*.tar.gz dist/pumpkin_api_py-${ARTIFACT_ID}.tar.gz + - name: Upload artifacts uses: actions/upload-artifact@v4 with: @@ -37,11 +55,13 @@ jobs: path: dist/pumpkin_api_py* - name: Upload artifacts to release - if: startsWith(github.ref, 'refs/tags/v') - uses: svenstaro/upload-release-action@v2 + uses: ncipollo/release-action@v1 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref }} - file: dist/pumpkin_api_py* - overwrite: true - file_glob: true + tag: ${{ env.GITHUB_RELEASE_TAG }} + artifacts: dist/pumpkin_api_py* + allowUpdates: true + omitPrereleaseDuringUpdate: true + omitName: true + omitBody: true + omitDraftDuringUpdate: true + removeArtifacts: true diff --git a/pyproject.toml b/pyproject.toml index c0ff06c..7f75cc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pumpkin-api-py" -version = "0.1.0.dev7" +version = "0.1.0" description = "Pumpkin plugin API for Python" authors = [{name = "alex"}] license = "GPL-3.0-only"