Repository navigation
ci: release with a one-click workflow that bumps, tags and drafts the release - #702
Open
JuliusHenke wants to merge 2 commits into
Open
JuliusHenke wants to merge 2 commits into
JuliusHenke wants to merge 2 commits into
Conversation
… release Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWRrkPjbgDH71tisPRcuvi
|
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 |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWRrkPjbgDH71tisPRcuvi
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.
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):planjob runs.github/scripts/release-plan.pywith a read-only token and no secrets. It finds the lastvX.Y.Ztag and the PRs merged since then, and picks the bump from their labels:breaking→ major,enhancement/deployment→ minor, anything else → patch. Thebumpinput 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.ymlhandles them.dry_runis on by default, so a run stops after the plan.releasejob runs in thereleaseenvironment. It checks out exactly the commit the plan approved and bumpsbuild.gradle.ktsandpackage.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-hubenvironment, so its deployment rules can limit the Docker Hub secrets to master andv*tags. The frontend image now carries SLSA provenance (mode=max) and an SBOM through the existingdocker/build-push-action, so no new action is added.Deployment notes
None for operators. Before the first real release, the maintainer has to do this setup (it's also in the workflow header):
ssh-keygen -t ed25519 -N "" -C tormap-release -f tormap-release). Add the public key under Settings → Deploy keys. Create the environmentreleasewith deployment branches "master" only and the secretRELEASE_DEPLOY_KEYholding the private key.docker-hubwith deployment branches and tagsmasterandv*. MoveDOCKERHUB_USERNAMEandDOCKERHUB_TOKENfrom the repository secrets into it. Until then, the jobs still read the repository secrets, so merging first doesn't break anything.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.^[0-9]+\.[0-9]+\.[0-9]+$.Testing
release-plan.pylocally on a copy of master with the v4.2.0 and v4.2.1 tags removed. It found v4.1.0, proposed v4.2.0 (minor), grouped feat(frontend): link to TorMap Lite without JavaScript by default #692, fix(backend): stop repeated and overlapping archive descriptor imports #694, feat(frontend): make tormap.org readable for search engines and AI crawlers #696 and feat(backend): let search engines index the TorMap Lite start and AS pages #697 like the generated notes, flagged ci: add Semgrep CE next to CodeQL, use Snyk for SCA only #695 and chore(release): bump version to 4.2.1 and check release tags against it #701 as unlabeled, left out 5 Renovate PRs and saw 14 passing checks. WithBUMP=patchit proposed v4.1.1 and warned that the labels suggest a minor bump. On the real master (HEAD = v4.2.1) it stops with "Nothing was committed since v4.2.1".sedcommands on copies of both files (4.2.1 → 4.3.0).check-release-version.shthen passed forv4.3.0, and on the unchanged files it fails forv4.3.0and passes forv4.2.1.Generated by Claude Code