Skip to content

ci: release with a one-click workflow that bumps, tags and drafts the release - #702

Open
JuliusHenke wants to merge 2 commits into
masterfrom
claude/project-thread-tjrm8k
Open

JuliusHenke wants to merge 2 commits into
masterfrom
claude/project-thread-tjrm8k

Conversation

@JuliusHenke

Copy link
Copy Markdown
Member

Requested by ju · project thread

Why

Releasing used to mean bumping two files, then tagging by hand. If the bump was forgotten, as with v4.2.0, the backend image overwrote an older version. This PR moves the whole flow into one workflow you start by hand, and only that workflow can push release tags.

Changes

  • release.yml (Actions → Release → Run workflow, from master):
    • The plan job runs .github/scripts/release-plan.py with a read-only token and no secrets. It finds the last vX.Y.Z tag and the PRs merged since then, and picks the bump from their labels: breaking → major, enhancement/deployment → minor, anything else → patch. The bump input can override that. The job checks that every check on master's HEAD passed and writes everything to the job summary. Renovate PRs are left out and unlabeled PRs are flagged, the same way .github/release.yml handles them.
    • dry_run is on by default, so a run stops after the plan.
    • The release job runs in the release environment. It checks out exactly the commit the plan approved and bumps build.gradle.kts and package.json. Then it pushes the commit and an annotated tag to master together with --atomic, without force and using the release deploy key. If master moved in the meantime, nothing is pushed. The tag push triggers the existing Docker workflows. Finally the job creates a draft release with the generated notes, which still has to be published by hand.
  • .github/scripts/check-release-version.sh: the tag-against-versions check from chore(release): bump version to 4.2.1 and check release tags against it #701, now shared by both Docker workflows and the release job.
  • Docker workflows: they run in a docker-hub environment, so its deployment rules can limit the Docker Hub secrets to master and v* tags. The frontend image now carries SLSA provenance (mode=max) and an SBOM through the existing docker/build-push-action, so no new action is added.
  • AGENTS.md / THREAT_MODEL.md: a new Releases section, plus the release key and the environments added to secrets and supply chain.

Deployment notes

None for operators. Before the first real release, the maintainer has to do this setup (it's also in the workflow header):

  1. Create a deploy key with write access (ssh-keygen -t ed25519 -N "" -C tormap-release -f tormap-release). Add the public key under Settings → Deploy keys. Create the environment release with deployment branches "master" only and the secret RELEASE_DEPLOY_KEY holding the private key.
  2. Create the environment docker-hub with deployment branches and tags master and v*. Move DOCKERHUB_USERNAME and DOCKERHUB_TOKEN from the repository secrets into it. Until then, the jobs still read the repository secrets, so merging first doesn't break anything.
  3. Rulesets: import a tag ruleset where only deploy keys may create, update or delete v* tags. Replace the classic master protection with a ruleset that has the same rules plus blocked deletion and force push, with repository admins and deploy keys allowed to bypass. A classic protection rule can't let a deploy key bypass the PR requirement.
  4. Optional: turn on immutable releases (Settings → General → Releases) and Docker Hub immutable tags for ^[0-9]+\.[0-9]+\.[0-9]+$.

Testing


Generated by Claude Code

… release

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SWRrkPjbgDH71tisPRcuvi
@JuliusHenke JuliusHenke added the deployment Operators must take action when deploying label Nov 14, 2026 — with Claude
@JuliusHenke JuliusHenke self-assigned this Nov 14, 2026
@JuliusHenke JuliusHenke removed the deployment Operators must take action when deploying label Nov 14, 2026 — with Claude
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 2508c32):

https://tormap-36f44--pr702-claude-project-threa-khluo65e.web.app

(expires Tue, 17 Nov 2026 11:31:53 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0c1f71965de18e60b0e686b0d0356977fec090dc

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.

2 participants