Skip to content
name: Build and publish to PyPI
on:
release:
types: [created]
jobs:
check-release:
name: Reuse check release
uses: ./.github/workflows/check_release.yml
build:
name: Reuse build
uses: ./.github/workflows/build.yml
publish-to-pypi:
needs:
- check-release
- build
runs-on: ubuntu-latest
environment:
name: prod
url: https://pypi.org/p/openapi-to-asciidoc
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
# Download artifacts from the build job
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Publish distribution 📦 to PyPI
# if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
sign-artifacts: true