Release Process
Releasing barangay is intentionally mechanical: bump the version, refresh the bundled data, tag, and let GitHub Actions publish to PyPI. This page documents each step and the CI that finishes the job.
Versioning
The package uses calendar versioning of the form YYYY.M.D.PATCH:
YYYY.M.Dis the date of the bundled PSGC masterlist the release ships (e.g.2026.4.13)..PATCHis a zero-based patch counter for successive code-only or fix releases on top of the same data date (.0,.1,.2, …).
A data update resets D (and therefore the base), while a code/fix change on top of the same data bumps PATCH. The bundled data date lives in barangay/data/CURRENT_VERSION.
The publish workflow matches tags shaped *.*.*.* — i.e. exactly four dot-separated components. Both the calendar form (v2026.4.13.4) and the early four-component tags match; the leading v is optional.
Steps
- Bump the version — update the version string in
pyproject.toml(and any version references) to the newYYYY.M.D.PATCH. - Refresh the data — for a data update, regenerate the bundled PSGC files and
CURRENT_VERSIONviapoe barpar(see data update guide); for a patch, skip this. - Commit on a
release/<ver>branch — e.g.release/2026-4-13-4. Do not commit tomaindirectly. - Tag — create an annotated tag matching
*.*.*.*(calendar form recommended:git tag v2026.4.13.4). - Push the tag —
git push origin <tag>. This is the single action that kicks off publishing. - CI builds and publishes —
.github/workflows/publish.yamltriggers on the tag push:- Checkout the code at the tag.
- Set up Python 3.13 and
uv. uv syncto install dependencies.uv buildto build the wheel and sdist.- Publish the distributions to PyPI using trusted publishing (
pypa/gh-action-pypi-publish).
- Merge to
main— open a PR fromrelease/<ver>intomain; once reviewed and merged, the release is reflected on the default branch.
Tag the commit after it lands on (or is ready for) the release branch, and push the tag before merging the PR. The workflow fires on the tag push itself — there is no separate “publish” button. If uv build or the publish step fails, fix forward and create a new tag rather than force-pushing.
The publish workflow
For reference, the full workflow that runs on a *.*.*.* tag is .github/workflows/publish.yaml:
name: Release
on:
push:
tags:
- '*.*.*.*'
jobs:
pypi-publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/barangay/
permissions:
id-token: write # trusted publishing
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: "3.13" }
- uses: astral-sh/setup-uv@v4
- run: uv sync
- run: uv build
- uses: pypa/gh-action-pypi-publish@release/v1Authentication is trusted publishing (OIDC) — there are no long-lived PyPI tokens in the repo. The environment: pypi gate on the job is where PyPI-side approval and the project URL are configured.