✅ Binary build pipeline - Complete and pushed to main ✅ GitHub Actions workflow - Complete and pushed to main
When you push a tag like v0.2.0:
- GitHub Actions will build binaries for all platforms (macOS, Linux, Windows)
- GitHub Actions will create a GitHub Release with all binary assets
- GitHub Actions will publish the package to NPM
You have two options:
- Go to https://www.npmjs.com/settings/[username]/tokens
- Create a new "Automation" token
- Go to your GitHub repo → Settings → Secrets → Actions
- Add a new secret:
- Name:
NPM_TOKEN - Value: Your npm automation token
- Name:
This is the modern, secure approach (no long-lived tokens). When Bun fully supports OIDC:
- Go to https://www.npmjs.com/package/@kitlangton/tailcode
- Settings → "Trusted Publishers"
- Add GitHub repository:
- Owner:
kitlangton - Repo:
tailcode - Workflow:
.github/workflows/release-binaries.yml
- Owner:
- Then uncomment the "Option A" section in the workflow and remove "Option B"
You can test the workflow without creating a real release:
# 1. Build locally to verify everything works
bun run build:bundle
bun run build:compile
./dist/releases/tailcode-darwin-arm64 --help
# 2. Create a test tag and push to trigger GitHub Actions
git tag v0.1.2-test
git push origin v0.1.2-test
# 3. Watch the Actions run at:
# https://github.com/kitlangton/tailcode/actions
# 4. After testing, delete the test tag
git tag -d v0.1.2-test
git push origin --delete v0.1.2-test# 1. Update version in package.json
# 2. Commit the version bump
git add package.json
git commit -m "chore: bump version to 0.2.0"
# 3. Create and push tag
git tag v0.2.0
git push origin v0.2.0
# 4. GitHub Actions will automatically:
# - Build all binaries
# - Create GitHub Release
# - Publish to NPMtailcode-darwin-arm64(macOS Apple Silicon)tailcode-darwin-x64(macOS Intel)tailcode-linux-x64(Linux x64)tailcode-linux-arm64(Linux ARM)tailcode-windows-x64.exe(Windows x64)SHA256SUMS(checksums for verification)
The existing bundled JS (dist/tailcode.js) is published to NPM as @kitlangton/tailcode
Based on best practices and the research:
- Build → Happens first (on every tag push)
- GitHub Release → Happens after build succeeds
- NPM Publish → Happens after build succeeds (parallel to GitHub Release)
This order ensures:
- Binaries are available even if NPM publish fails
- NPM package is available for
bunxusers - Both distribution channels work independently
If something goes wrong:
- Delete GitHub Release: Go to Releases → Delete the broken release
- Unpublish NPM (within 24h):
npm unpublish @kitlangton/tailcode@0.2.0 - Delete tag:
git push --delete origin v0.2.0 && git tag -d v0.2.0 - Fix issue and retag
Watch the releases at: