From bb987b9fc152c56830171bd52615e58a1aa42474 Mon Sep 17 00:00:00 2001 From: Christine Wang Date: Wed, 5 Feb 2025 17:50:09 -0800 Subject: [PATCH 1/3] support manual tags --- .github/workflows/release.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 030b0f3a4..40d7d6ff0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,7 +71,7 @@ jobs: path: ./wheelhouse/*.whl release: - if: ${{ github.ref == 'refs/heads/develop' }} + if: ${{ github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/') }} needs: build runs-on: ubuntu-latest environment: release @@ -93,12 +93,21 @@ jobs: merge-multiple: true pattern: wheels-* - - name: Github release + - name: Semantic release + if: ${{ github.ref == 'refs/heads/develop' }} uses: codfish/semantic-release-action@v3 id: semantic env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Github release + if: ${{ startsWith(github.ref, 'refs/tags/') }} + uses: softprops/action-gh-release@v2 + with: + files: dist/* + fail_on_unmatched_files: true + generate_release_notes: true + - name: PyPI release if: steps.semantic.outputs.new-release-published == 'true' run: | From 0f6bff6e37ab903b13f5f499b7e88a35484db91d Mon Sep 17 00:00:00 2001 From: Christine Wang Date: Wed, 5 Feb 2025 17:56:37 -0800 Subject: [PATCH 2/3] semantic release won't work anyways --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40d7d6ff0..0c8347715 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -116,7 +116,7 @@ jobs: uv publish --publish-url https://upload.pypi.org/legacy/ - uses: slackapi/slack-github-action@v2.0.0 - if: always() && steps.semantic.outputs.new-release-published == 'true' + if: always() with: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} From c75d2816a49db75dfb29411c5985e2c8d323a6e0 Mon Sep 17 00:00:00 2001 From: Christine Wang Date: Wed, 5 Feb 2025 18:03:26 -0800 Subject: [PATCH 3/3] going to revert for now --- .github/workflows/release.yml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c8347715..cf4cd591d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,15 +71,12 @@ jobs: path: ./wheelhouse/*.whl release: - if: ${{ github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/') }} + if: startsWith(github.ref, 'refs/tags/') needs: build runs-on: ubuntu-latest environment: release permissions: - contents: write # to be able to publish a GitHub release - issues: write # to be able to comment on released issues - pull-requests: write # to be able to comment on released pull requests - id-token: write # to enable use of OIDC for npm provenance + contents: write # grants permission to create a release on github steps: - uses: actions/checkout@v4 @@ -93,28 +90,20 @@ jobs: merge-multiple: true pattern: wheels-* - - name: Semantic release - if: ${{ github.ref == 'refs/heads/develop' }} - uses: codfish/semantic-release-action@v3 - id: semantic - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Release PyPI + run: | + export UV_PUBLISH_PASSWORD="${{ secrets.PYPI_TOKEN }}" + export UV_PUBLISH_USERNAME="__token__" + uv publish --publish-url https://upload.pypi.org/legacy/ - name: Github release - if: ${{ startsWith(github.ref, 'refs/tags/') }} + id: github-release uses: softprops/action-gh-release@v2 with: files: dist/* fail_on_unmatched_files: true generate_release_notes: true - - name: PyPI release - if: steps.semantic.outputs.new-release-published == 'true' - run: | - export UV_PUBLISH_PASSWORD="${{ secrets.PYPI_TOKEN }}" - export UV_PUBLISH_USERNAME="__token__" - uv publish --publish-url https://upload.pypi.org/legacy/ - - uses: slackapi/slack-github-action@v2.0.0 if: always() with: