Skip to content

feat: distribute binaries via npm platform packages#7

Merged
rhuanbarreto merged 2 commits into
mainfrom
fix/npm-oidc-setup-node
Feb 23, 2026
Merged

feat: distribute binaries via npm platform packages#7
rhuanbarreto merged 2 commits into
mainfrom
fix/npm-oidc-setup-node

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Replaces GitHub Releases / Homebrew distribution with the Sentry-style npm platform package pattern
  • Users install via npm install -g archgate; the CJS wrapper resolves and executes the correct platform binary
  • Drops update-homebrew job and scripts/ directory entirely

Changes

New files:

  • packages/archgate-darwin-arm64/package.json — platform npm package (os: darwin, cpu: arm64)
  • packages/archgate-linux-x64/package.json — platform npm package (os: linux, cpu: x64)
  • bin/archgate.cjs — Node.js CJS wrapper (.cjs required because root has "type": "module")

Modified:

  • package.json — adds bin, optionalDependencies for platform packages, updates files, removes build/build:darwin/build:linux scripts
  • .github/workflows/release-binaries.yml — replaces GitHub Release upload + Homebrew update with npm OIDC publish; contents: read + id-token: write

Deleted: scripts/install.sh, scripts/archgate.rb, scripts/build.ts

How it works on release

  1. CI builds the binary for each platform
  2. Copies it into packages/<artifact>/bin/archgate
  3. Sets the version via npm version "$VERSION" --no-git-tag-version
  4. Publishes via npm publish --access public using OIDC trusted publishing

Test plan

  • Verify bun run validate passes (203 tests, 0 lint errors) ✅
  • On next GitHub release, confirm both platform packages appear on npm
  • npm install -g archgate on macOS arm64 and Linux x64 → archgate --version works

🤖 Generated with Claude Code

Replace GitHub Releases / Homebrew distribution with the Sentry-style
npm platform package pattern. Users now install via `npm install -g archgate`.

- Add packages/archgate-darwin-arm64 and packages/archgate-linux-x64 with
  os/cpu fields and placeholder version 0.0.0 (CI sets from release tag)
- Add bin/archgate.cjs CJS wrapper (required by "type": "module" root)
- Update package.json: bin field, optionalDependencies, files, drop build scripts
- Rewrite release-binaries.yml: drop update-homebrew job, publish to npm
  via OIDC (contents: read, id-token: write, setup-node@v4)
- Remove scripts/install.sh, scripts/archgate.rb, scripts/build.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rhuanbarreto rhuanbarreto force-pushed the fix/npm-oidc-setup-node branch from 6e73449 to 15f6abc Compare February 23, 2026 20:16
@rhuanbarreto rhuanbarreto merged commit e3102f6 into main Feb 23, 2026
2 checks passed
@archgatebot archgatebot Bot mentioned this pull request Feb 23, 2026
@rhuanbarreto rhuanbarreto deleted the fix/npm-oidc-setup-node branch February 24, 2026 22:50
rhuanbarreto added a commit that referenced this pull request Feb 28, 2026
* feat: distribute binaries via npm platform packages

Replace GitHub Releases / Homebrew distribution with the Sentry-style
npm platform package pattern. Users now install via `npm install -g archgate`.

- Add packages/archgate-darwin-arm64 and packages/archgate-linux-x64 with
  os/cpu fields and placeholder version 0.0.0 (CI sets from release tag)
- Add bin/archgate.cjs CJS wrapper (required by "type": "module" root)
- Update package.json: bin field, optionalDependencies, files, drop build scripts
- Rewrite release-binaries.yml: drop update-homebrew job, publish to npm
  via OIDC (contents: read, id-token: write, setup-node@v4)
- Remove scripts/install.sh, scripts/archgate.rb, scripts/build.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Apply automatic changes

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
rhuanbarreto added a commit that referenced this pull request Mar 3, 2026
* feat: distribute binaries via npm platform packages

Replace GitHub Releases / Homebrew distribution with the Sentry-style
npm platform package pattern. Users now install via `npm install -g archgate`.

- Add packages/archgate-darwin-arm64 and packages/archgate-linux-x64 with
  os/cpu fields and placeholder version 0.0.0 (CI sets from release tag)
- Add bin/archgate.cjs CJS wrapper (required by "type": "module" root)
- Update package.json: bin field, optionalDependencies, files, drop build scripts
- Rewrite release-binaries.yml: drop update-homebrew job, publish to npm
  via OIDC (contents: read, id-token: write, setup-node@v4)
- Remove scripts/install.sh, scripts/archgate.rb, scripts/build.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Apply automatic changes

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
rhuanbarreto added a commit that referenced this pull request Mar 4, 2026
* feat: distribute binaries via npm platform packages

Replace GitHub Releases / Homebrew distribution with the Sentry-style
npm platform package pattern. Users now install via `npm install -g archgate`.

- Add packages/archgate-darwin-arm64 and packages/archgate-linux-x64 with
  os/cpu fields and placeholder version 0.0.0 (CI sets from release tag)
- Add bin/archgate.cjs CJS wrapper (required by "type": "module" root)
- Update package.json: bin field, optionalDependencies, files, drop build scripts
- Rewrite release-binaries.yml: drop update-homebrew job, publish to npm
  via OIDC (contents: read, id-token: write, setup-node@v4)
- Remove scripts/install.sh, scripts/archgate.rb, scripts/build.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Apply automatic changes

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant