Skip to content
Merged
Changes from all commits
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
18 changes: 11 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: deploy
on:
release:
types: [published]
workflow_dispatch: {}
workflow_dispatch:

jobs:
build-wheels:
Expand All @@ -19,7 +19,6 @@ jobs:
- name: Build wheels
uses: pypa/cibuildwheel@v4.2.0
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
CIBW_SKIP: '*musllinux*'
CIBW_ARCHS: native
Expand Down Expand Up @@ -48,12 +47,14 @@ jobs:
name: artifact-source-dist
path: ./**/dist/*.tar.gz

deploy:
publish:
name: Upload release to (Test) PyPI
environment: pypi
needs: [build-wheels, build-sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Copy artifacts to dist/ folder
Expand All @@ -63,7 +64,10 @@ jobs:
find . -name '*.tar.gz' -exec mv '{}' dist/ \;
find . -name '*.whl' -exec mv '{}' dist/ \;
- name: Publish package to test pypi
if: github.event_name == 'release' && github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@v1.13.0
- name: Publish package to test pypi
if: github.event_name != 'release'
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
Loading