ci(release): make the release tag-driven (stop pushing to protected main) #14
Reference in New Issue
Block a user
No description provided.
Delete Branch "ci/tag-driven-release"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The push-to-
mainrelease model kept failing at the very last step across runs #187 and #194: the job builds and signs the APK fine, thengit push origin HEAD:main(the version-bump commit) is rejected bymain's branch protection —pre-receive hook declined/Internal Server Error.mainis deliberately protected (allowlist push, required approvals, required status checks), which is fundamentally incompatible with a CI job pushing a fresh commit to it.What changes
Flip the trigger: the workflow now runs on pushing a
v*tag (orworkflow_dispatchwith ataginput). The tag is the release input, so the job never touches protectedmain.versionName/versionCodeare derived from the tag name (e.g.v0.1.0→0.1.0, code100). The conventional-commit version-planning engine is gone.app/build.gradle.ktsis set for the build only, never committed back.git pushto main, no tag creation, noREGISTRY_USER— the job only needsREGISTRY_TOKENto create the Gitea release and uploadrunic-gateway-<v>.apk+SHA256SUMS.setup-android, no Gradle cache,timeout-minutes: 30).How to cut a release after this merges
(or create the tag from the Gitea UI, or use Actions → Release APK → Run workflow with the tag). That's the whole flow.
Notes
v0.1.0only in their ephemeral runners; nov0.1.0tag exists in the repo yet.AI disclosure
Authored with assistance from Claude (Claude Code). See commit trailer.
🤖 Generated with Claude Code