Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to publish tagged releases to PyPI #1369

Merged
merged 7 commits into from
Sep 24, 2024
Merged
Changes from 1 commit
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
Next Next commit
CI/CD: Add step to publish wheels on tag creation
matthewdouglas committed Sep 23, 2024
commit 11ea93da5b39776a0f1a6479c74d5dc4f0bc2df4
27 changes: 27 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ on:
release:
types: [published]
workflow_dispatch: {} # Allow manual trigger
workflow_call: {} # Allow triggering from other worfkflows

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -221,6 +222,32 @@ jobs:
- run: pip install auditwheel
- run: python ./.github/scripts/auditwheel_show.py wheels/* | tee $GITHUB_STEP_SUMMARY

publish-wheels:
name: Publish wheels to Test PyPI
needs: [build-wheels, audit-wheels]
runs-on: ubuntu-latest
if: |
github.repository == 'bitsandbytes-foundation/bitsandbytes'
&& github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment:
name: release
url: https://test.pypi.org/p/bitsandbytes
permissions:
id-token: write
steps:
- name: Download distribution artifacts
uses: actions/download-artifact@v4
with:
path: dist/
pattern: "bdist_wheel_*"
merge-multiple: true

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true
repository-url: https://test.pypi.org/legacy/

# test:
# needs:
# - build-wheels
Empty file.