1.7 KiB
1.7 KiB
Create a new Gitea release for this project using semantic versioning.
Current state
Fetch tags and find the latest version:
!git fetch --tags && git tag --sort=-v:refname | head -5
Commits since the last release (if no tags exist, this shows all commits):
!git log $(git describe --tags --abbrev=0 2>/dev/null && echo "$(git describe --tags --abbrev=0)..HEAD" || echo "") --oneline
Instructions
-
Determine current version from the tag output above. If no
vX.Y.Ztags exist, treat current version asv0.0.0. -
Analyze commits using conventional commit prefixes to pick the semver bump:
- Breaking changes (
!after type, orBREAKING CHANGEin body) → major bump feat:→ minor bumpfix:,chore:,deps:,revert:, and everything else → patch bump- Use the highest applicable bump level across all commits
- Breaking changes (
-
Generate release notes — group commits into sections:
- Features —
feat:commits - Fixes —
fix:commits - Other — everything else (
chore:,deps:,revert:, etc.) - Omit empty sections. Each commit is a bullet point with its short description (strip the prefix).
- Features —
-
Present for approval — show the user:
- Current version → proposed new version
- The full release notes
- The exact
teacommand that will run - Ask the user to confirm before proceeding
-
Create the release — on user approval, run:
tea releases create --login gitea --repo ryan/c4 --tag <version> --target main -t "<version>" -n "<release notes>"Do NOT create a local git tag — Gitea creates it server-side.
-
Verify — run
tea releases ls --login gitea --repo ryan/c4to confirm the release was created.