Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}
Expand Down