Skip to content

ImageBlock and Wagtail 6.4 #19

ImageBlock and Wagtail 6.4

ImageBlock and Wagtail 6.4 #19

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [published]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Install uv
uses: hynek/setup-cached-uv@v2
- name: Build
run: uvx flit build
- uses: actions/upload-artifact@v4
with:
path: ./dist
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
pypi-publish:
needs: build
environment: 'release'
name: ⬆️ Upload release to PyPI
runs-on: ubuntu-latest
permissions:
# Mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
- name: 🚀 Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifact/
print-hash: true