Plan 06 — GitHub Actions
.github/workflows/ci.yaml¶
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.13', '3.14']
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dev dependencies
run: uv sync --group dev
- name: Run tests
run: uv run pytest -v
- name: REUSE compliance check
run: uv run reuse lint
.github/workflows/publish.yaml¶
name: Publish
on:
push:
tags: [v*]
jobs:
publish:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- name: Build distribution
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Configure a PyPI Trusted Publisher for
commitizen-spdx-changelogunder your PyPI account settings before the first release. The workflow file path to register is.github/workflows/publish.yaml, environmentpypi.
Tasks¶
- Create
.github/workflows/directory. - Create
.github/workflows/ci.yaml. Test matrix (Python 3.13, 3.14), uv setup, test run, REUSE compliance check. - Create
.github/workflows/publish.yaml. Tag-triggered (v*) publish with OIDC trusted publishing.
Dependencies¶
- Plan 05 must be complete — tests pass and the package is functional.
- GitHub repository with
uvsupport (astral-sh/setup-uv action). - PyPI account with trusted publishing configured.
Acceptance¶
-
.github/workflows/ci.yamlexists with the test matrix. -
.github/workflows/publish.yamlexists with tag-triggered publish. - Workflow files pass YAML validation (no syntax errors).
Next¶
→ Continue to Plan 07 — REUSE and Smoke Test