Skip to content

Publish

Publish #7

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:
build:
name: Build distribution files
uses: ./.github/workflows/build.yaml
publish:
name: Publish to ${{ inputs.repository }}
needs: [build]
runs-on: ubuntu-latest
environment:
name: publish-${{ inputs.repository }}
url: ${{ vars.ENVIRONMENT_URL }}
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: package-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1