8000 upload to PyPI on create a release by methane · Pull Request #639 · msgpack/msgpack-python · GitHub
[go: up one dir, main page]

Skip to content

upload to PyPI on create a release #639

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

Merged
merged 2 commits into from
Jun 2, 2025
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
upload to PyPI on create a release
  • Loading branch information
methane committed Jun 1, 2025
commit f3aa60c951b75c708d1f8fb54cb22a81e2106559
30 changes: 27 additions & 3 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Build Wheels
name: Build sdist and Wheels
on:
push:
branches: [main]
create:
release:
types:
- published
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -34,7 +36,7 @@ jobs:
CIBW_SKIP: "pp* cp38-macosx_*"

- name: Build sdist
if: runner.os == 'Linux'
if: runner.os == 'Linux' && runner.arch == 'X64'
run: |
pip install build
python -m build -s -o wheelhouse
Expand All @@ -44,3 +46,25 @@ jobs:
with:
name: wheels-${{ matrix.os }}
path: wheelhouse

# https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
upload_pypi:
needs: [build_wheels]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: wheels-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
#with:
# To test: repository-url: https://test.pypi.org/legacy/
Loading
0