Skip to main content

/package-release Command

System Prompt

⚠️ EXECUTION DIRECTIVE: When the user invokes this command, you MUST:

  1. IMMEDIATELY execute - no questions, no explanations first
  2. ALWAYS show full output from script/tool execution
  3. ALWAYS provide summary after execution completes

DO NOT:

  • Say "I don't need to take action" - you ALWAYS execute when invoked
  • Ask for confirmation unless requires_confirmation: true in frontmatter
  • Skip execution even if it seems redundant - run it anyway

The user invoking the command IS the confirmation.


Purpose

Orchestrate the complete release workflow: version management, multi-platform builds, artifact packaging, signing, manifest generation, and publication.

Usage

# Release with specific version
/package-release 1.2.0

# Bump patch version (1.1.0 -> 1.1.1)
/package-release --patch

# Bump minor version (1.1.0 -> 1.2.0)
/package-release --minor

# Bump major version (1.1.0 -> 2.0.0)
/package-release --major

# Preview release (no actual publishing)
/package-release 1.2.0 --dry-run

# Release specific platforms only
/package-release --patch --platforms darwin-x64,darwin-arm64

Action Policy

Pre-Release Validation

Before initiating release:

  1. Verify clean git working directory
  2. Confirm on main/release branch
  3. Validate version format (semver)
  4. Check no existing tag with version
  5. Run test suite (unless --skip-tests)

Release Workflow

1. Version Bump
└─> Update package.json/Cargo.toml
└─> Generate/update CHANGELOG.md

2. Build (per platform)
└─> darwin-x64, darwin-arm64
└─> linux-x64, linux-arm64, linux-x64-musl
└─> win32-x64

3. Sign (if configured)
└─> macOS: codesign + notarization
└─> Windows: Authenticode
└─> Linux: GPG detached signatures

4. Package
└─> Create tarballs/zips
└─> Generate checksums
└─> Create manifest.json

5. Publish
└─> Upload to CDN
└─> Create GitHub Release
└─> Update npm packages

Agent Delegation

This command delegates to binary-distribution-architect for:

  • Release pipeline orchestration
  • Manifest generation
  • CDN upload configuration
  • Version channel management

Output

Success Output

╭─────────────────────────────────────────────╮
│ Release v1.2.0 Complete │
├─────────────────────────────────────────────┤
│ Version: 1.2.0 │
│ Platforms: 6/6 successful │
│ Signed: 3/3 platforms │
│ Published: CDN + GitHub + npm │
├─────────────────────────────────────────────┤
│ CDN URLs: │
│ stable: https://cdn.../stable/manifest │
│ latest: https://cdn.../latest/manifest │
│ version: https://cdn.../v1.2.0/manifest │
├─────────────────────────────────────────────┤
│ GitHub Release: │
│ https://github.com/.../releases/v1.2.0 │
├─────────────────────────────────────────────┤
│ Checksums: SHA256SUMS uploaded │
╰─────────────────────────────────────────────╯

Dry Run Output

╭─────────────────────────────────────────────╮
│ Release v1.2.0 (DRY RUN) │
├─────────────────────────────────────────────┤
│ Would perform: │
│ ✓ Bump version to 1.2.0 │
│ ✓ Build 6 platforms │
│ ✓ Sign darwin + win32 + linux │
│ ✓ Generate manifest.json │
│ ✓ Upload to CDN │
│ ✓ Create GitHub Release │
│ ✓ Update npm packages │
├─────────────────────────────────────────────┤
│ No changes made (--dry-run enabled) │
╰─────────────────────────────────────────────╯

Error Handling

Common Errors

Dirty working directory:

ERROR: Git working directory has uncommitted changes
FIX: Commit or stash changes before release

Version already exists:

ERROR: Tag v1.2.0 already exists
FIX: Use different version or delete existing tag

Build failure:

ERROR: Build failed for linux-arm64
FIX: Check build logs, fix compilation errors
Use --platforms to exclude problematic platform

Examples

Standard Patch Release

User: /package-release --patch