Skip to content

Split jobs into wheel builds and uploads #1

Split jobs into wheel builds and uploads

Split jobs into wheel builds and uploads #1

Workflow file for this run

name: upload
env:
ARTIFACT_NAME: wheel
on:
workflow_run:
workflows: ["wheels"]
types: ["completed"]
jobs:
upload-to-test-pypi:
name: Upload release to Test PyPI
runs-on: ubuntu-latest
environment:
name: release-test
permissions:
id-token: write
steps:
- name: Download distribution artifacts
uses: actions/download-artifact@v4
with:
pattern: ${{ env.ARTIFACT_NAME }}-*
merge-multiple: true
path: dist
- name: List artifacts
run: ls -lh dist
- name: Publish package distributions to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
continue-on-error: true
upload-to-pypi:
name: Upload release to PyPI
needs: [build-sdist, build-wheels]
runs-on: ubuntu-latest
environment:
name: release
permissions:
id-token: write
steps:
- name: Download distribution artifacts
uses: actions/download-artifact@v4
with:
pattern: ${{ env.ARTIFACT_NAME }}-*
merge-multiple: true
path: dist
- name: List artifacts
run: ls -lh dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1