This document describes how to publish AIRIS Code to npm and Homebrew.
- npm account: You need publish access to
@airiscodescope - GitHub release: Create a tagged release for Homebrew
# Ensure all tests pass
make test
# Build all packages
make build
# Update version (choose one)
cd apps/airiscode-cli
pnpm version patch # 0.1.0 -> 0.1.1
pnpm version minor # 0.1.0 -> 0.2.0
pnpm version major # 0.1.0 -> 1.0.0# Login to npm (first time only)
npm login
# Publish from CLI package directory
cd apps/airiscode-cli
pnpm publish --access public
# Or use npm directly
npm publish --access public# Check on npm
npm view @airiscode/cli
# Test installation
npm install -g @airiscode/cli
airis --version# Tag the release
git tag -a v0.1.0 -m "Release v0.1.0"
git push origin v0.1.0
# Or create release via GitHub UI
# https://github.com/agiletec-inc/airiscode/releases/new# Calculate SHA256 of release tarball
curl -L https://github.com/agiletec-inc/airiscode/archive/refs/tags/v0.1.0.tar.gz | shasum -a 256# Clone the tap repository
git clone https://github.com/agiletec-inc/homebrew-tap.git
cd homebrew-tap
# Copy updated formula
cp /path/to/airiscode/homebrew/airiscode.rb Formula/airiscode.rb
# Update version and SHA256 in Formula/airiscode.rb
# url "https://github.com/agiletec-inc/airiscode/archive/refs/tags/v0.1.0.tar.gz"
# sha256 "<calculated-sha256>"
# Commit and push
git add Formula/airiscode.rb
git commit -m "Update airiscode to v0.1.0"
git push# Test locally
brew install --build-from-source Formula/airiscode.rb
# Test from tap
brew uninstall airiscode
brew update
brew install agiletec-inc/tap/airiscode
# Verify
airis --versionWe follow Semantic Versioning:
- MAJOR (1.0.0): Breaking changes
- MINOR (0.1.0): New features, backward compatible
- PATCH (0.0.1): Bug fixes, backward compatible
# 1. Update version
cd apps/airiscode-cli
pnpm version <major|minor|patch>
# 2. Commit version bump
git add .
git commit -m "chore: bump version to v0.2.0"
# 3. Create git tag
git tag -a v0.2.0 -m "Release v0.2.0"
# 4. Push
git push && git push --tags
# 5. Publish to npm
pnpm publish --access public
# 6. Update Homebrew formula (see above)Before publishing:
- All tests pass (
make test) - Build succeeds (
make build) - Version updated in
package.json - CHANGELOG.md updated
- README.md reflects new features
- Git tag created
- GitHub release created
After publishing:
- npm package published
- Homebrew formula updated
- Installation verified from both sources
- Documentation updated
You need publish access to the @airiscode scope:
# Contact scope owner to add you as maintainer
# Or publish under different scopeCommon issues:
- Wrong SHA256: Recalculate after GitHub release
- Build failure: Test with
--build-from-sourceflag - Missing dependencies: Check formula dependencies
Ensure versions match across:
apps/airiscode-cli/package.json- Git tag (e.g.,
v0.1.0) - Homebrew formula URL
- GitHub release
Consider GitHub Actions for automated releases:
# .github/workflows/publish.yml
name: Publish
on:
push:
tags:
- 'v*'
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: pnpm install
- run: pnpm build
- run: pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}