Skip to content
Merged
Show file tree
Hide file tree
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: 14 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,15 @@ jobs:
path: ./wheelhouse/*.whl

release:
if: startsWith(github.ref, 'refs/tags/')
if: ${{ github.ref == 'refs/heads/develop' }}
needs: build
runs-on: ubuntu-latest
environment: release
permissions:
contents: write # grants permission to create a release on github
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
steps:
- uses: actions/checkout@v4

Expand All @@ -90,22 +93,21 @@ jobs:
merge-multiple: true
pattern: wheels-*

- name: Release PyPI
- 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'
run: |
export UV_PUBLISH_PASSWORD="${{ secrets.PYPI_TOKEN }}"
export UV_PUBLISH_USERNAME="__token__"
uv publish --publish-url https://upload.pypi.org/legacy/

- name: Make 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()
if: always() && steps.semantic.outputs.new-release-published == 'true'
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"private": true,
"release": {
"branches": ["develop"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"assets": ["dist/**"]
}
]
]
}
}