diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 030b0f3a4..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' }} + 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,21 +90,22 @@ jobs: merge-multiple: true pattern: wheels-* - - name: Github release - uses: codfish/semantic-release-action@v3 - id: semantic - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: PyPI release - if: steps.semantic.outputs.new-release-published == 'true' + - 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 + id: github-release + uses: softprops/action-gh-release@v2 + with: + files: dist/* + fail_on_unmatched_files: true + generate_release_notes: true + - 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 }}