Skip to content

v0.9.0 - housekeeping, and Wagtail 7.0+ only #6

v0.9.0 - housekeeping, and Wagtail 7.0+ only

v0.9.0 - housekeeping, and Wagtail 7.0+ only #6

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read # to fetch code (actions/checkout)
steps:
- name: Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
objects.githubusercontent.com:443
github.com:443
pypi.org:443
api.github.com:443
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.14'
- name: ⬇️ Install build dependencies
run: |
python -m pip install --upgrade pip flit
- name: 🏗️ Build
run: python -Im flit build
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
path: ./dist
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
publish-pypi:
name: ⬆️ Upload release to PyPI
environment: 'publish'
runs-on: ubuntu-latest
needs: build
permissions:
id-token: write # mandatory for trusted publishing
steps:
- name: 🔒 Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
api.github.com:443
ghcr.io:443
pkg-containers.githubusercontent.com:443
pypi.org:443
upload.pypi.org:443
files.pythonhosted.org:443
fulcio.sigstore.dev:443
rekor.sigstore.dev:443
tuf-repo-cdn.sigstore.dev:443
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: dist
- name: 🚀 Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
attestations: true