Skip to content

feat(release): release the template through a release pull request - #24

Merged
MattFisher merged 4 commits into
mainfrom
feat/self-release
Oct 7, 2026
Merged

MattFisher merged 4 commits into
mainfrom
feat/self-release

Conversation

@MattFisher

Copy link
Copy Markdown
Contributor

Every release of this template so far was published before its changelog section was on main, so bump-v1 refused it and v1 stayed put: 1.0.0, 1.1.0 (first attempt) and 1.1.1. This moves the template to the release flow python-project-template uses for itself, where the changelog is cut inside the release pull request.

What changes

  • Changelog fragments. Each PR adds a file under changelog.d/ (uvx --from scriv scriv create) instead of editing CHANGELOG.md. scriv.ini and TEMPLATE.md match python-project-template. ## [Unreleased] becomes the scriv insert marker. Generated projects are unaffected.
  • Prepare template release (workflow_dispatch) calls python-project-template's reusable prepare-release.yml@v1 with version-source: tags. It takes the next version from the latest vX.Y.Z tag, collects the fragments and opens a "Release vX.Y.Z" PR.
  • Template release on merge calls release-on-merge.yml@v1. It tags the merge commit, creates the GitHub release and dispatches bump-v1.yml on the tag.
  • bump-v1.yml gains the workflow_dispatch trigger and the "newest final v1.X.Y tag only" guard from python-project-template. With this, the file matches python-project-template's apart from two comment lines.
  • Dependabot ignores Generality-Labs/* in this repo's own workflows, so it won't re-pin the @v1 refs.
  • README gets a "Releasing this template" section.

I chose calling the reusable workflows over copying them, so release fixes arrive here when python-project-template moves its v1, the same as for its generated projects. Both repos are public, so no cross-repo access setting is needed. This repo already has the Actions PR setting on.

Testing

  • Local dry run on this branch: the auto bump choice (copied from prepare-release.yml) reads the fragment as Added + Changed and picks minor. The tag-based version comes out as 1.2.0, and scriv==1.8.0 collect --version 1.2.0 writes a ## [1.2.0] - 2026-10-07 section under the marker and deletes the fragment. bump-v1's changelog check then passes for v1.2.0.
  • actionlint is clean on all workflows. zizmor --offline --persona=auditor reports only the existing self-repository note on template-ci.yml; the two @v1 refs carry inline ignores.

Order

Publish v1.1.2 by hand before merging this. Its changelog section is already on main, so bump-v1 will accept it, and then the first automated release starts from v1.1.2. After merge, the first run of Prepare template release will propose 1.2.0 from this PR's fragment.

🤖 Generated with Claude Code

MattFisher and others added 4 commits October 7, 2026 18:34
Same scriv.ini and fragment template as python-project-template, and the
insert marker in place of the [Unreleased] heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A release created with the default Actions token raises no release
event, so the release-on-merge workflow starts bump-v1 on the tag
instead. Ported from python-project-template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rkflows

Prepare template release and Template release on merge call its reusable
prepare-release.yml and release-on-merge.yml at @v1 with
version-source: tags. Dependabot leaves those @v1 refs alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MattFisher
MattFisher merged commit b26ee2f into main Oct 7, 2026
3 checks passed
@MattFisher
MattFisher deleted the feat/self-release branch October 7, 2026 07:46
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