| name | release |
| description | Create a new release version. Validates, tests, builds, and pushes a tagged release. Use when asked to "release", "publish", "bump version", or "create a new version". |
Release
Create a new release for moe-bangumi.
Usage
/release — auto-detect version from conventional commits.
/release 1.8.0 — use the specified version directly (skip auto-detection).
Workflow
Step 1: Determine Version
If version is provided as argument:
- Parse the version from the user's input
- Verify it follows semver format:
X.Y.Z
- Check that the tag
vX.Y.Z does not already exist:
git tag -l "vX.Y.Z"
If no version is provided (auto-detect):
- Get the current version from
moe-bangumi.cabal:
grep '^version:' moe-bangumi.cabal | awk '{print $2}'
- Get commits since the last tag:
git log $(git describe --tags --abbrev=0)..HEAD --oneline
- If there are no
feat: or fix: commits, warn the user and stop.
- Determine the bump type:
- If any commit message contains
BREAKING CHANGE in the body or uses !: (e.g., feat!:) → major bump (X+1.0.0)
- If any commit starts with
feat → minor bump (X.Y+1.0)
- If only
fix commits → patch bump (X.Y.Z+1)
- Calculate the next version and present it to the user along with the commit summary.
- Proceed with the detected version (no need to ask for confirmation).
Step 2: Pre-release Checks
Run these checks and stop if any fail:
git status --porcelain
cd web && bun run build
Step 3: Generate Changelog
Review commits since the last tag to understand what changed:
git log $(git describe --tags --abbrev=0)..HEAD --oneline
Present a summary of changes to the user for confirmation.
Step 4: Execute Release
Use the justfile release command which handles everything atomically:
just release X.Y.Z
This command:
- Validates version format
- Checks tag doesn't exist
- Updates version in
moe-bangumi.cabal
- Generates CHANGELOG.md via git-cliff
- Commits with message
chore: release X.Y.Z
- Creates git tag
vX.Y.Z
- Pushes to origin (main branch + tag)
Step 5: Verify
After pushing, the GitHub Action (.github/workflows/release.yml) will automatically:
- Build the Linux binary (static, via ghc-musl)
- Create a GitHub Release with the binary attached
Check the action status:
gh run list --limit 1
Report the release URL to the user.