Skip to content

chore: separate workflow for semantic #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 6, 2025
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/[email protected]
if: always() && steps.semantic.outputs.new-release-published == 'true'
if: always()
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down