File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,3 +131,30 @@ jobs:
131131
132132 - name : Publish to PyPI
133133 uses : pypa/gh-action-pypi-publish@release/v1
134+
135+ publish-github-release :
136+ name : publish wheels to GitHub Release
137+ if : startsWith(github.ref, 'refs/tags/v')
138+ needs :
139+ - build-wheels
140+ runs-on : ubuntu-latest
141+ permissions :
142+ contents : write
143+ steps :
144+ - name : Download wheel artifacts
145+ uses : actions/download-artifact@v4
146+ with :
147+ pattern : wheels-*
148+ path : dist
149+ merge-multiple : true
150+
151+ - name : Create release and upload wheels
152+ env :
153+ GH_TOKEN : ${{ github.token }}
154+ GH_REPO : ${{ github.repository }}
155+ run : |
156+ if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
157+ gh release upload "$GITHUB_REF_NAME" dist/*.whl --clobber
158+ else
159+ gh release create "$GITHUB_REF_NAME" dist/*.whl --generate-notes --verify-tag
160+ fi
You can’t perform that action at this time.
0 commit comments