Switch CI deploy trigger to semver tags and document the release workflow #143
Reference in New Issue
Block a user
Delete Branch "%!s()"
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
Without a defined deployment trigger, every push to
mainwould deploy — including work-in-progress merges, dependency bumps, and minor fixes that aren't ready for users. We want deployment to be an explicit, intentional act.Tag-based deployment gives us this cleanly:
main. Tests run, nothing deploys.This is simpler than maintaining a separate
developbranch, which would require every feature to be merged twice and adds merge-conflict risk with no real benefit at this team size.What to do
1. Ensure the CI workflow
on:block has the tag triggerThe
build-and-pushanddeployjobs (added in #142) already gate onstartsWith(gitea.ref, 'refs/tags/v'). Theon:block at the top of.gitea/workflows/ci.ymlmust also declare tag pushes as a trigger:Note: in Gitea Actions YAML you can merge these into one
push:block:Or more explicitly, using separate entries — verify what Gitea Actions supports and test with a dry run.
2. Document the release process in CONTRIBUTING or DEPLOYMENT.md
Add a "Releasing a new version" section to
DEPLOYMENT.md(created in #139):3. Protect the
mainbranchIn Gitea → repo settings → Branches → add a protection rule for
main:This ensures
mainis always green and tags always point to tested code.4. Verify CI behaviour with a dry-run tag
Before calling this done, push a test tag and confirm:
build-and-pushruns after they passdeployruns afterbuild-and-pushAcceptance criteria
git push origin v0.1.0triggers the full pipeline (tests → build → deploy) in Gitea Actions.DEPLOYMENT.mdcontains a "Releasing a new version" section covering tagging, versioning convention, and rollback.mainbranch has protection rules requiring passing CI before merge.