Skip to content

Workflow file for this run

name: PyPI
jobs:
publish-to-pypi:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
runs-on: ubuntu-latest
needs:
- build-wheels
environment:
name: pypi
url: https://pypi.org/p/hogpp # Replace <package-name> with your PyPI project name
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: |
dist/
wheelhouse/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
sign:
name: Sign packages
needs:
- publish-to-pypi
runs-on: ubuntu-latest
id-token: write # IMPORTANT: mandatory for sigstore
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: |
dist/
wheelhouse/
- name: Sign packages with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: >-
dist/*.tar.gz
wheelhouse/*.whl
- name: Upload artifact signatures
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release upload '${{ github.ref_name }}'
dist/** wheelhouse/**
--repo '${{ github.repository }}'