Skip to content

Add tag-triggered release management to this repo - #38

Merged
ali92hm merged 1 commit into
masterfrom
add-release-management-cookiecutter
Sep 27, 2026
Merged

ali92hm merged 1 commit into
masterfrom
add-release-management-cookiecutter

Conversation

@ali92hm

@ali92hm ali92hm commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Follow-up to #37

#37 added tag-triggered release management to the generated project. This does the same for the outer cookiecutter-pyproject repo, with one deliberate difference: no PyPI publish. This repo is a cookiecutter template, consumed via cookiecutter gh:ali92hm/cookiecutter-pyproject, not pip install, so a release here is a git tag + GitHub release with the build artifacts attached — nothing gets uploaded to an index.

What changed

  • .github/workflows/release.yml (new) — triggers on push: tags: ['v*']. Verifies the tag matches the VERSION file, runs make ci, builds the package, and creates a GitHub release via gh release create --generate-notes dist/*.
  • scripts/check-version.sh (new) — asserts a given tag equals v$(cat VERSION). Used by CI so a mismatch fails before anything is created.
  • scripts/release-tag.sh (new) — creates the annotated v<version> tag from VERSION (refuses on a dirty tree or an existing tag) and prints the push command. The push stays a deliberate human action, same pattern as the generated project.
  • Makefile — adds check-version and release-tag targets.
  • CHANGELOG.md — was empty; now has a Keep a Changelog scaffold with compare links.
  • docs/development-instructions.md — documents the bump → merge → tag release flow.
  • docs/project-structure.md — lists the new workflow and scripts.

Testing

Run locally with real dependencies (Python 3.11):

  • make check-style — pass
  • make check-types (mypy) — pass, 0 issues
  • make test-unit — 16/16 pass
  • make test-integration — 18/18 pass
  • make test-e2e — 2/2 pass
  • make build — succeeds
  • Manually exercised check-version.sh (matching tag / mismatched tag / no arg) and release-tag.sh (dirty tree / clean tree / existing tag) — all behaved correctly. release-tag.sh's success and existing-tag paths were tested against an isolated copy of the repo so as not to tag this real repo before a release is actually intended.
  • Validated release.yml as YAML directly with ruby -ryaml (no Jinja templating involved here, unlike the generated-project version)

Known gap (shared with #37, not addressed here)

release.yml accepts a v* tag pushed from any branch, so tagging a feature branch would trigger a release. Branch protection plus the documented tag-from-master flow covers the normal case.

🤖 Generated with Claude Code

Follow-up to #37, which added release management to the generated
project. This does the same for the outer cookiecutter-pyproject repo
itself, with one difference: no PyPI publish. This repo is a
cookiecutter template consumed via `cookiecutter gh:...`, not
`pip install`, so a release here means a git tag and a GitHub release
with the build artifacts attached, nothing more.

- .github/workflows/release.yml triggers on `push: tags: [v*]`, verifies
  the tag matches the VERSION file via the new check-version.sh, runs
  the full test suite, builds the package, and creates a GitHub release.
- release-tag.sh creates the annotated v<version> tag locally and prints
  the push command, keeping the push itself a deliberate action.
- CHANGELOG.md gets a Keep a Changelog scaffold (was empty).
- docs/development-instructions.md documents the bump -> merge -> tag
  flow, and docs/project-structure.md lists the new files.

Verified locally: make check-style, check-types, test-unit,
test-integration, test-e2e and build all pass, plus manual exercise of
check-version.sh and release-tag.sh (matching/mismatched tag, clean/
dirty tree, existing tag).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ali92hm
ali92hm merged commit 726d3e1 into master Sep 27, 2026
12 checks passed
@ali92hm
ali92hm deleted the add-release-management-cookiecutter branch September 27, 2026 19:09
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