CI/CD and releases¶
This repository uses GitHub Actions under .github/workflows/.
Continuous integration (ci.yml)¶
Runs on push and pull_request to main or master:
uv sync --all-groupsruff check/ruff format --checkpytestmkdocs build --strict(documentation must build cleanly)
Documentation site (docs.yml)¶
Builds MkDocs and deploys to GitHub Pages when the default branch is updated (or on workflow_dispatch).
One-time repository setup
- Settings → Pages → Build and deployment
- Set Source to GitHub Actions (not “Deploy from a branch”).
The published URL is:
https://advanced-process-control.github.io/model-parser/
(site_url in mkdocs.yml must stay aligned with that base.)
PyPI releases (release.yml)¶
Runs on push of SemVer tags:
vMAJOR.MINOR.PATCH(e.g.v0.1.0)- Pre-releases matching
vMAJOR.MINOR.PATCH.*(e.g.v0.2.0-rc.1)
The job:
- Syncs the environment and runs
uv build - Uploads
dist/as a workflow artefact - Creates a GitHub Release (with generated notes) and attaches the built files
- Publishes to PyPI using trusted publishing (OIDC) — no long-lived API token in secrets
After publish, end users typically install the CLI with pipx install apc-model-parser or uv tool install apc-model-parser (command on PATH: model-parser).
PyPI trusted publisher¶
Configure the pending publisher on PyPI for:
- Repository:
Advanced-Process-Control/model-parser - Workflow:
release.yml - Environment: if you set
pypion PyPI, create a matching GitHub Environment namedpypi(Settings → Environments) so OIDC claims match. If PyPI leaves environment blank, remove or adjust theenvironment:block inrelease.ymlaccordingly.
GitHub Environment URL¶
The workflow sets environment.url to the PyPI project page for convenience when
viewing deployment status.
Tagging order¶
Bump version in pyproject.toml and __version__ in src/model_parser/__init__.py,
merge to the default branch, then create an annotated tag on that commit and
push the tag. See AGENTS.md
for the full release policy.