This directory contains automated CI/CD workflows for the Autohand CLI project.
Triggers:
- Push to
main(stable release) - Push to
beta(beta release) - Push to
alpha(alpha release) - Manual workflow dispatch
What it does:
-
Determines version based on conventional commits
feat:→ MINOR bump (0.1.0 → 0.2.0)fix:→ PATCH bump (0.1.0 → 0.1.1)feat!:orBREAKING CHANGE:→ MAJOR bump (0.1.0 → 1.0.0)
-
Builds binaries for all platforms:
- macOS Apple Silicon (
autohand-macos-arm64) - macOS Intel (
autohand-macos-x64) - Linux x64 (
autohand-linux-x64) - Linux ARM64 (
autohand-linux-arm64) - Windows x64 (
autohand-windows-x64.exe)
- macOS Apple Silicon (
-
Generates changelog from commit history
-
Creates GitHub Release with binaries attached
-
Publishes to npm (stable releases only)
Release Channels:
- main →
v1.2.3(stable) - beta →
v1.2.3-beta.202511221100(beta with timestamp) - alpha →
v1.2.3-alpha.20251122110530(alpha with timestamp)
Triggers:
- Pull requests to
main,beta,alpha - Push to any branch (except main, beta, alpha)
What it does:
- Type checking
- Build verification
- Test execution
- Multi-platform build test
Add these secrets in GitHub Settings → Secrets → Actions:
NPM_TOKEN(required for npm publishing)# Generate at https://www.npmjs.com/settings/<your-username>/tokens # Type: Automation token
-
Enable Actions
- Settings → Actions → General
- Allow all actions and reusable workflows
-
Workflow Permissions
- Settings → Actions → General → Workflow permissions
- ✅ Read and write permissions
- ✅ Allow GitHub Actions to create pull requests
-
Make changes and commit with conventional commits:
git commit -m "feat: add new feature" git commit -m "fix: resolve bug"
-
Merge to appropriate branch:
# For alpha testing git checkout alpha git merge feature-branch git push # For beta testing git checkout beta git merge alpha git push # For stable release git checkout main git merge beta git push
-
GitHub Actions automatically:
- Determines version
- Builds binaries
- Generates changelog
- Creates release
- Go to: Actions → Release → Run workflow
- Choose:
- Branch: main/beta/alpha
- Version: Leave empty for auto, or specify (e.g.,
1.2.3) - Channel: alpha/beta/release
- Click "Run workflow"
Format: MAJOR.MINOR.PATCH[-prerelease]
- MAJOR: Breaking changes (
feat!:orBREAKING CHANGE:) - MINOR: New features (
feat:) - PATCH: Bug fixes (
fix:)
- Alpha:
1.2.3-alpha.20251122110530(timestamp) - Beta:
1.2.3-beta.202511221100(timestamp) - Release:
1.2.3(no suffix)
The workflow automatically generates changelogs from commits, categorizing them:
⚠️ BREAKING CHANGES: Breaking changes- ✨ Features: New features
- 🐛 Bug Fixes: Bug fixes
- 🔧 Maintenance: Chores and maintenance
Check:
- All dependencies are in
package.json - TypeScript compiles without errors (
bun run typecheck) - Bun version compatibility
Check:
- Commit message follows conventional commits
- Not a version bump commit (contains
chore(release):) - Repository has write permissions enabled
Check:
NPM_TOKENsecret is set and valid- Package name is available on npm
- Version doesn't already exist on npm
Test the build locally before pushing:
# Build all platforms
bun run compile:all
# Test a specific platform
bun run compile:macos-arm64
# Verify binary
./binaries/autohand-macos-arm64 --helpView workflow runs:
- Repository → Actions tab
- Click on workflow run to see logs
- Download artifacts from completed runs