Skip to content

Publish Python Package to Test PyPI #1

Publish Python Package to Test PyPI

Publish Python Package to Test PyPI #1

name: Publish Python Package to Test PyPI
on:
# release:
# types: [published]
workflow_dispatch:
jobs:
publish_all:
name: Publish wheels and sdist to Test PyPI
# if: github.event_name == 'release' && github.event.action == 'published'
environment: testpypi
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: dawidd6/action-download-artifact@v7
with:
# Required, if the repo is private a Personal Access Token with `repo` scope is needed or GitHub token in a job where the permissions `action` scope set to `read`
#github_token: ${{secrets.GITHUB_TOKEN}}
# Optional, workflow file name or ID
# If not specified, will be inferred from run_id (if run_id is specified), or will be the current workflow
workflow: python-build-wheels.yml
# Optional, the status or conclusion of a completed workflow to search for
# Can be one of a workflow conclusion:
# "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required"
# Or a workflow status:
# "completed", "in_progress", "queued"
# Use the empty string ("") to ignore status or conclusion in the search
workflow_conclusion: success
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: cibw-sdist
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: cibw-wheels-ubuntu-latest-0
repository-url: https://test.pypi.org/legacy/