Repository navigation
👷 ci(release): move releases to shared workflows - #637
Merged
Merged
Conversation
gaborbernat
force-pushed
the
fix/release-contract
branch
from
October 21, 2026 07:06
c26fdf3 to
94d7447
Compare
Eee622
approved these changes
Oct 24, 2026
Eee622
approved these changes
Oct 24, 2026
gaborbernat
force-pushed
the
fix/release-contract
branch
8 times, most recently
from
October 26, 2026 20:58
0aba430 to
dd2b4d3
Compare
gaborbernat
force-pushed
the
fix/release-contract
branch
4 times, most recently
from
October 27, 2026 01:58
d11f37f to
457838e
Compare
Move releases to the shared github-workflows 6.0.1 pipeline and release-creator 4.1.0. Preparation, App-authored commits and tags, distribution builds and release notes come from the shared Actions. The Sphinx changelog gets user-facing categories, stable release anchors and credits from commit authors and co-authors, and the PyPI description is rendered by hatch-fancy-pypi-readme. CONTRIBUTING explains that fragments carry no hand-written credit and that prepare runs release-creator contributors. The tag workflow builds the distributions in parallel with a read-only notes job, uploads to PyPI through OIDC, verifies the published digests and creates the GitHub Release with one call. Only writers can push or move tags, so the step that re-checked the tag before the GitHub Release is gone, as is the always-true pull_request condition on the news job. Distributions and notes pass between jobs by artifact ID. Tag runs never cancel; pull request and branch runs do. Nab writes pylock.toml from a [tool.nab] table, with a temporary upload cutoff exception for release-creator 4.1.0. A build group locks the hatchling backend with Cython and setuptools, because PyYAML has no CPython 3.15 wheel. The release-check group and the release-validate group, used only by the shared prepare validate job that 6.0.0 removed, go. Dependabot's pre-commit ecosystem and pre-commit.ci's quarterly autoupdate own hook updates, so the hook cooldown check and the managed hook pins go. Every workflow, job and step name starts with an emoji, which renames the required checks "Required checks pass" and "📦 build". CodeQL moves from default setup to a committed advanced workflow on ubuntu-26.04 with the same languages, now running the security-extended suite and skipping tests.
gaborbernat
force-pushed
the
fix/release-contract
branch
from
October 27, 2026 04:00
457838e to
e04812f
Compare
gaborbernat
marked this pull request as ready for review
October 27, 2026 05:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
platformdirs releases now run on the shared tox-dev/github-workflows 6.0.1 pipeline and release-creator 4.1.0, so this repo stops carrying its own scripts for version bumping, changelog assembly, release notes and tag pushing. 🚀 Changelog readers get user-facing categories (Added, Fixed, Packaging and so on), a stable anchor for each release and category, and a credit line on every entry. The whole history back to
v2.0.0a1is rewritten into that shape, with maintenance-only entries dropped.Contributors write a fragment that holds only the change. The new CONTRIBUTING section explains that the news check rejects a hand-written PR number or credit, and that release preparation links each fragment to its squash-merged PR, credits the authors and co-authors of the merge commit, and runs
release-creator contributorsto add a New Contributors subsection. The news check moves into its own workflow, so adding or removing theskip newslabel reruns that check alone instead of the whole test matrix.Architecture
A release starts with one dispatch of the shared Towncrier prepare workflow, which assembles the changelog and pushes the release commit and tag with the release App's token. On the tag, the shared
validate-python-releaseworkflow builds the distributions while a read-only job renders the GitHub Release body from the changelog. PyPI publishing uses OIDC; a verify job then checks the files on PyPI against the built ones, and only after that does the last job create the GitHub Release in a single call. Jobs hand distributions and notes to each other by artifact ID.flowchart LR Prepare[Prepare release<br/>commit + tag] --> Build[Build distributions] Prepare --> Notes[Render release notes] Build --> PyPI[Publish to PyPI] Notes --> PyPI PyPI --> Verify[Verify PyPI files] Verify --> GH[GitHub Release] Notes --> GH classDef shared fill:#cfe4ff,stroke:#1f6feb,color:#0b1f3a; classDef publish fill:#ffe3a3,stroke:#d29200,color:#3a2c00; class Prepare,Build,Notes,Verify shared; class PyPI,GH publish;The workflows trust people with write access and validate their work when a PR merges. This repo drops the tag-time guard that refused to publish a version missing from the changelog, and the PyPI upload no longer skips files that already exist. PR-time checks stay, and the shared action runs the fragment check and the lock check only when the PR touches the files they validate.
Dependencies and packaging
🔒 nab now writes
pylock.tomlfrom the[tool.nab]table: universal mode, a seven-day upload cutoff, CPython 3.15 on Linux x86_64. A temporary per-package cutoff lets release-creator 4.1.0 in before its seven days pass. Abuildgroup locks the hatchling backend with Cython and setuptools, since PyYAML 6.0.3 ships no CPython 3.15 wheel. Release jobs install their tools from that lock through per-job groups, and a weekly workflow opens a PR that relockspylock.toml. Test, type and docs CI still resolve current dependencies.Hook updates come from Dependabot's
pre-commitecosystem weekly with a seven-day cooldown, and pre-commit.ci autoupdate drops to quarterly. Hook revisions are frozen to commit SHAs, andmdformatruns from its upstream repo with pinned plugins. On PyPI, hatch-fancy-pypi-readme renders the project description, the metadata declaresimport-names, and the license classifier goes in favor of the existinglicense = "MIT"expression, as PEP 639 asks. CI moves to thewindows-2025-vs2026,macos-26andubuntu-26.04runners, and every workflow, job and step name starts with an emoji.🛡️ CodeQL
CodeQL moves from default setup to a committed workflow on
ubuntu-26.04with the same languages (actions,python), now on thesecurity-extendedsuite withtestsignored, which removes theubuntu-latestmigration notice default setup produces.