Release Skill
Automates the complete release workflow for Multica application.
How to use
- •
/releaseStart the release workflow interactively.
Release Workflow
Execute the following steps in order. Stop immediately if any step fails.
Step 1: Git Branch Check
- •Verify current branch is
main - •Pull latest changes from remote
- •Ensure working directory is clean (no uncommitted changes)
bash
# Check current branch is main current_branch=$(git branch --show-current) if [ "$current_branch" != "main" ]; then echo "Error: Must be on main branch. Current branch: $current_branch" exit 1 fi # Pull latest changes git pull origin main # Check for uncommitted changes if [ -n "$(git status --porcelain)" ]; then echo "Error: Working directory has uncommitted changes" exit 1 fi
If not on main branch, abort and ask user to switch to main first.
Step 2: Environment Check
- •Check if
.envfile exists in the project root - •Verify the following Apple credentials are set in
.env:- •
APPLE_ID - •
APPLE_APP_SPECIFIC_PASSWORD - •
APPLE_TEAM_ID
- •
- •Check GitHub CLI authentication:
gh auth status - •If any check fails, inform the user what's missing and abort
bash
# Check .env exists test -f .env # Check required variables (source and verify) source .env test -n "$APPLE_ID" && test -n "$APPLE_APP_SPECIFIC_PASSWORD" && test -n "$APPLE_TEAM_ID" # Check gh CLI gh auth status
Step 3: Code Quality Checks
Run all quality checks before making any changes. Abort if any fail:
bash
pnpm typecheck # TypeScript compilation check pnpm lint # ESLint check pnpm format:check # Prettier format check pnpm test:run # Unit tests
Step 4: Version Confirmation
- •Read current version from
package.json - •Ask the user for the new version number (e.g.,
0.1.4) - •Update the
versionfield inpackage.json
Use AskUserQuestion tool with options like:
- •Patch bump (current → next patch)
- •Minor bump (current → next minor)
- •Major bump (current → next major)
- •Custom version
Step 5: Build Application
- •Clean previous build artifacts
- •Source the environment variables
- •Run the Mac build which creates both architectures
bash
# Clean previous build rm -rf dist/ # Build source .env && pnpm build:mac
This will:
- •Build arm64 (Apple Silicon) version
- •Build x64 (Intel) version
- •Automatically notarize with Apple (notarize: true in config)
- •Output files to
dist/directory:- •
Multica-{version}-arm64.dmgand.blockmap - •
Multica-{version}-x64.dmgand.blockmap - •
Multica-{version}-arm64-mac.zipand.blockmap - •
Multica-{version}-x64-mac.zipand.blockmap - •
latest-mac.yml(auto-updater manifest)
- •
Step 6: Commit Version Change
Commit the version bump and push to remote:
bash
git add package.json
git commit -m "chore: bump version to {version}"
git push origin main
Step 7: Generate Release Notes
- •
Get the latest release tag:
bashgh release list --limit 1 --json tagName -q '.[0].tagName'
- •
Get commits since last release (or all commits if first release):
bash# If there's a previous release tag: git log {last_tag}..HEAD --oneline # If this is the first release (no previous tag): git log --oneline - •
Analyze the commits and generate release notes with sections:
- •New Features - New functionality added
- •Bug Fixes - Issues resolved
- •Improvements - Enhancements to existing features
- •Other Changes - Documentation, refactoring, etc.
Format example:
markdown
## What's New ### New Features - Feature description from commit ### Bug Fixes - Fix description from commit ### Improvements - Improvement description from commit
Step 8: Create GitHub Release
- •
Create the release with generated notes and all build artifacts:
bashgh release create v{version} \ --title "v{version}" \ --notes "{release_notes}" \ dist/Multica-{version}-arm64.dmg \ dist/Multica-{version}-arm64.dmg.blockmap \ dist/Multica-{version}-x64.dmg \ dist/Multica-{version}-x64.dmg.blockmap \ dist/Multica-{version}-arm64-mac.zip \ dist/Multica-{version}-arm64-mac.zip.blockmap \ dist/Multica-{version}-x64-mac.zip \ dist/Multica-{version}-x64-mac.zip.blockmap \ dist/latest-mac.ymlThe uploaded files include:
- •DMG files: Primary installers for each architecture
- •ZIP files: Alternative distribution format (required by auto-updater)
- •Blockmap files: Enable incremental/delta updates
- •latest-mac.yml: Manifest file for electron-updater to check for new versions
- •
Confirm the release was created successfully
- •
Provide the release URL to the user
Important Notes
- •Never skip any step
- •Always wait for build completion before proceeding
- •The build process may take several minutes due to notarization
- •If build fails, check Apple credential validity