Skip to content

Workflow file for this run

name: Publish Python 🐍 distributions πŸ“¦ to PyPI
on:
release:
types: [published]
jobs:
build:
name: Build distribution πŸ“¦
runs-on: ubuntu-latest
permissions:
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build and inspect Python 🐍 package πŸ“¦
uses: hynek/build-and-inspect-python-package@2dbbf2b252d3a3c7cec7a810e3ed5983bd17b13a # v2.8.0
with:
attest-build-provenance-github: true
publish-to-pypi:
name: Publish Python 🐍 distribution πŸ“¦ to PyPI
needs: build
if: ${{ github.event.action == 'published' }}
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/batgrl/${{ github.ref_name }}
permissions:
id-token: write
steps:
- name: Download dists
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: Packages
path: dist/
- name: Publish distribution πŸ“¦ to PyPI
uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
with:
verbose: true
print-hash: true