Skip to content

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
name: Build and publish release to PyPI
runs-on: ubuntu-latest
# This uses PyPI trusted publishing
environment:
name: pypi
url: https://pypi.org/p/wagtail-inventory
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip build
- name: Build the package
run: |
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1