Skip to content

Commit 9bf3859

Browse files
committed
Upload wheels to release page as well, issue: #62
1 parent de7fd69 commit 9bf3859

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)