File tree Expand file tree Collapse file tree 1 file changed +29
-3
lines changed
Expand file tree Collapse file tree 1 file changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -70,15 +70,41 @@ jobs:
7070 - name : Run tests with built wheel
7171 run : uv run --with dist/*.whl --with pytest pytest testing --color=yes
7272
73+ create-release :
74+ name : Create GitHub Release
75+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
76+ needs : [test, build-and-inspect]
77+ runs-on : ubuntu-latest
78+ permissions :
79+ contents : write
80+
81+ steps :
82+ - name : Download built packages
83+ uses : actions/download-artifact@v4
84+ with :
85+ name : Packages
86+ path : dist
87+
88+ - name : Extract version from tag
89+ id : version
90+ run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
91+
92+ - name : Create GitHub Release
93+ uses : softprops/action-gh-release@v2
94+ with :
95+ files : dist/*
96+ fail_on_unmatched_files : true
97+ generate_release_notes : true
98+ name : Version ${{ steps.version.outputs.VERSION }}
99+
73100 publish-to-pypi :
74101 name : Publish to PyPI
75- if : github.event_name == 'push' && github.event.action == 'published'
76- needs : [test, build-and-inspect]
102+ if : github.event_name == 'push' && startsWith( github.ref, 'refs/tags/')
103+ needs : [test, build-and-inspect, create-release ]
77104 runs-on : ubuntu-latest
78105 environment : pypi-upload
79106 permissions :
80107 id-token : write
81- attestations : write
82108
83109 steps :
84110 - name : Download built packages
You can’t perform that action at this time.
0 commit comments