Skip to content

CD

CD #9

Workflow file for this run

name: CD
on:
workflow_dispatch:
release:
types:
- published
env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3
jobs:
pypi-publish:
name: Build & publish to PyPI
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/docstub
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Build wheel & sdist
run: |
git clean -fxd
pip install -U build twine wheel
python -m build --sdist --wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0