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.Zdoes 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:orfix:commits, warn the user and stop. - Determine the bump type:
- If any commit message contains
BREAKING CHANGEin 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
fixcommits → patch bump (X.Y.Z+1)
- If any commit message contains
- 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:
# Ensure working tree is clean
git status --porcelain
# Build frontend
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.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.