Skip to content

Publish

Publish #4

Workflow file for this run

# See also:
# https://github.com/pypa/gh-action-pypi-publish
# https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/
name: Publish
on:
workflow_dispatch:
inputs:
repository:
description: Target repository
type: choice
options: [PyPI, TestPyPI]
default: TestPyPI
required: true
release:
types: [published]
jobs:
publish:
name: Publish to ${{ inputs.repository }}
runs-on: ubuntu-latest
environment:
name: publish-${{ inputs.repository }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v4 # Required to use a dependent workflow
- uses: ./.github/workflows/build.yml
- uses: actions/download-artifact@v4
with:
pattern: package-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1