File tree Expand file tree Collapse file tree 2 files changed +30
-12
lines changed
Expand file tree Collapse file tree 2 files changed +30
-12
lines changed Original file line number Diff line number Diff line change @@ -71,12 +71,15 @@ jobs:
7171 path : ./wheelhouse/*.whl
7272
7373 release :
74- if : startsWith( github.ref, 'refs/tags/')
74+ if : ${{ github.ref == 'refs/heads/develop' }}
7575 needs : build
7676 runs-on : ubuntu-latest
7777 environment : release
7878 permissions :
79- contents : write # grants permission to create a release on github
79+ contents : write # to be able to publish a GitHub release
80+ issues : write # to be able to comment on released issues
81+ pull-requests : write # to be able to comment on released pull requests
82+ id-token : write # to enable use of OIDC for npm provenance
8083 steps :
8184 - uses : actions/checkout@v4
8285
@@ -90,22 +93,21 @@ jobs:
9093 merge-multiple : true
9194 pattern : wheels-*
9295
93- - name : Release PyPI
96+ - name : Github release
97+ uses : codfish/semantic-release-action@v3
98+ id : semantic
99+ env :
100+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
101+
102+ - name : PyPI release
103+ if : steps.semantic.outputs.new-release-published == 'true'
94104 run : |
95105 export UV_PUBLISH_PASSWORD="${{ secrets.PYPI_TOKEN }}"
96106 export UV_PUBLISH_USERNAME="__token__"
97107 uv publish --publish-url https://upload.pypi.org/legacy/
98108
99- - name : Make github release
100- id : github-release
101- uses : softprops/action-gh-release@v2
102- with :
103- files : dist/*
104- fail_on_unmatched_files : true
105- generate_release_notes : true
106-
107109 - uses : slackapi/slack-github-action@v2.0.0
108- if : always()
110+ if : always() && steps.semantic.outputs.new-release-published == 'true'
109111 with :
110112 method : chat.postMessage
111113 token : ${{ secrets.SLACK_BOT_TOKEN }}
Original file line number Diff line number Diff line change 1+ {
2+ "private" : true ,
3+ "release" : {
4+ "branches" : [" develop" ],
5+ "plugins" : [
6+ " @semantic-release/commit-analyzer" ,
7+ " @semantic-release/release-notes-generator" ,
8+ [
9+ " @semantic-release/github" ,
10+ {
11+ "assets" : [" dist/**" ]
12+ }
13+ ]
14+ ]
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments