Skip to content

馃懛 ci(release): adopt shared release workflow - #275

Draft
gaborbernat wants to merge 1 commit into
pytest-dev:mainfrom
gaborbernat:fix/release-contract
Draft

gaborbernat wants to merge 1 commit into
pytest-dev:mainfrom
gaborbernat:fix/release-contract

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

This draft moves pytest-print onto the shared release flow from github-workflows 6.0.0 and release-creator 4.0.0. Releases are prepared from Towncrier fragments: release-creator picks the version, assembles the changelog, adds a New Contributors subsection, and pushes an App-authored commit and tag. The 19 tagged changelog sections get user-facing categories, stable anchors and author credits, and a new CONTRIBUTING.md explains how to write fragments and why they carry no hand-written credits: credits come from commit authors and co-authors.

The tag workflow runs under a per-tag concurrency group. The shared validate-python-release workflow builds the wheel and sdist, while a read-only notes job renders the changelog section in parallel. PyPI publishing goes through OIDC and no longer skips existing files. A single job then reconciles the PyPI digests and attestations and creates the GitHub Release with one publish-github-release call. GitHub's generated notes and the separate draft stage are gone.

Checks that guard only against a writer are removed. The tag workflow no longer re-checks that the tag still names the release commit before the GitHub Release, since only a writer can move a tag. Prepare no longer requires refs/heads/main, because only writers can dispatch it; the fork guard on github.repository stays. news.yaml drops the pull_request condition that repeated its only trigger, and the release-validate group goes with the shared prepare job that installed it. gw 6.0.0 itself drops the lock, tag and patch re-checks it used to run in validate-python-release and prepare-towncrier-release.

Every job and step now has an emoji name, for example 馃殾 Required checks pass, 馃摑 News fragment and 馃殌 Publish GitHub Release.

pylock.toml now comes from Nab 0.0.22 and covers every group and extra on CPython 3.15 linux_x86_64, locking release-creator 4.0.0. The [tool.nab] table carries a temporary uploaded-prior-to exception for release-creator, to be deleted after 2026-11-02. A build dependency group locks the hatchling backend together with Cython and setuptools, because PyYAML has no CPython 3.15 wheel. The unused release, release-check and release-validate groups are removed. Tests still resolve fresh.

Hook updates move to Dependabot's pre-commit ecosystem with a seven-day cooldown, and pre-commit.ci autoupdates quarterly. The hook cooldown check and its scheduled rerun are removed, so 馃殾 Required checks pass only aggregates the test matrix.

The App key and client ID are staged in the main-only release-auth environment. A pytest-dev administrator still needs to install the repo-only App and configure its ruleset bypass before a release.

Before merging, the main ruleset's required checks must follow the renames: Required checks pass becomes 馃殾 Required checks pass, and changelog becomes 馃摑 News fragment. pre-commit.ci - pr is an external app check and keeps its name. swap_required_checks.py pytest-dev/pytest-print 275 --apply makes the swap right before the merge.

@gaborbernat gaborbernat added skip news PR does not need a changelog entry and removed skip news PR does not need a changelog entry labels Oct 20, 2026
@gaborbernat gaborbernat changed the title 馃敡 build(release): lock all project groups build(release): adopt shared release workflow Oct 21, 2026
@gaborbernat gaborbernat changed the title build(release): adopt shared release workflow 馃懛 ci(release): adopt shared release workflow Oct 21, 2026
@gaborbernat
gaborbernat force-pushed the fix/release-contract branch 6 times, most recently from 2f6547b to 6226580 Compare October 26, 2026 16:58
Prepare releases from Towncrier fragments through github-workflows 6.0.0
and publish the tag with the shared Python release workflow. The
changelog gets user-facing categories, stable anchors and author credits
for the 19 tagged sections, and a CONTRIBUTING guide explains fragments
and how credits come from commit authors and co-authors.

Nab writes pylock.toml for every group from a [tool.nab] table on
CPython 3.15 linux_x86_64, with a temporary upload cutoff exception for
release-creator 4.0.0. A build group locks the hatchling backend with
Cython and setuptools, because PyYAML has no CPython 3.15 wheel. The
unused release, release-check and release-validate groups are gone.

The tag workflow runs under a per-tag concurrency group. A read-only
notes job renders the changelog section in parallel with the build.
PyPI uploads no longer skip existing files. One job then verifies the
PyPI digests and creates the GitHub Release. Checks that only a writer
could defeat are dropped: the tag re-check before the GitHub Release,
the main-branch condition on prepare, and the pull_request condition
that repeated news.yaml's only trigger.

Every job and step carries an emoji name. The required checks become
"馃殾 Required checks pass" and "馃摑 News fragment".

Dependabot's pre-commit ecosystem and pre-commit.ci's quarterly
autoupdate handle hook updates, so there is no hook cooldown check.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant