Releases
This repository creates release tags automatically from Conventional Commit messages on main.
Files
.github/workflows/semantic-tag.yml: inspects commits onmain, computes the next semver version, and creates av*tag through the Forgejo API.github/workflows/release.yml: runs when av*tag is pushed, builds platform archives, creates the Forgejo release entry, and uploads the assets
One-Time Setup
- Create a Forgejo access token for a user or bot that can create tags in this repository.
- Add that token to repository secrets as
RELEASE_TOKEN. - Make sure the token can trigger follow-up workflows when it creates a tag.
- Push the workflow files to
main. - Trigger the
Semantic Tagworkflow withworkflow_dispatchif you want to verify the setup immediately.
Commit Format
Use Conventional Commits for changes that should drive versioning.
fix: correct tmux session lookup-> patch releasefeat: add project detail page-> minor releasefeat!: change session API shape-> major release
Breaking changes can also be written with a footer:
feat: change session payload
BREAKING CHANGE: session responses now omit archived messages by defaultThe semantic tag workflow currently treats these commit types as releasable:
feat-> minorfix,perf,refactor-> patch- breaking change marker or
!-> major
If no releasable Conventional Commits are present since the latest v* tag, no new tag is created.
Normal Release Flow
- Merge or push Conventional Commit changes onto
main. - The
Semantic Tagworkflow runs. - It finds the latest
v*tag and evaluates commits since that tag. - It calculates the next semantic version.
- It creates the new
v*tag through the Forgejo API. - The existing
Releaseworkflow sees the new tag, builds the platform archives, creates the release entry, and uploads the assets.
Direct Pushes To Main
Direct pushes to main are the normal case for this setup.
- You push commits directly to
main. - The
Semantic Tagworkflow runs on that push. - If the new commits include releasable Conventional Commits, it creates the next tag immediately.
- That tag triggers the packaging and release workflow.
There is no release PR in this flow.
First Release
If the repository has no v* tags yet, the semantic tag workflow starts from 0.0.0.
Examples:
- first releasable
fix:commit ->v0.0.1 - first releasable
feat:commit ->v0.1.0 - first breaking change ->
v1.0.0
Why A Dedicated Token Is Required
The semantic tag workflow uses RELEASE_TOKEN instead of the default automation token so the created tag can trigger the separate tag-based release workflow.
If your Forgejo instance suppresses follow-up workflow triggers from automation-created refs, using the default automation token can create the tag without starting .github/workflows/release.yml.
Troubleshooting
If no tag is created:
- Confirm the workflow ran on
main. - Confirm
RELEASE_TOKENexists and has repository write access. - Confirm at least one commit since the latest
v*tag follows the releasable Conventional Commit patterns. - Check the workflow log for
No releasable conventional commits found.
If the tag is created but no release assets appear:
- Confirm the new
v*tag exists in Forgejo. - Confirm
.github/workflows/release.ymlran for that tag. - Confirm the token used to create the tag is allowed to trigger follow-up workflows on your Forgejo instance.