mirror of
https://github.com/Twigpine/gl-npm.git
synced 2026-11-10 08:11:24 -10:00
main
5 packages: main wrapper + 4 platform binaries (darwin-arm64, darwin-x64, linux-arm64, linux-x64). Publish script downloads binaries from GitHub releases and publishes all packages.
gl-npm
npm distribution for the gitlawb CLI.
Packages
| Package | Description |
|---|---|
@gitlawb/gl |
Main wrapper — auto-selects the correct binary |
@gitlawb/gl-darwin-arm64 |
macOS Apple Silicon binary |
@gitlawb/gl-darwin-x64 |
macOS Intel binary |
@gitlawb/gl-linux-arm64 |
Linux ARM binary |
@gitlawb/gl-linux-x64 |
Linux x64 binary |
Publishing
After a gitlawb release is tagged and binaries are uploaded to GitHub:
./scripts/publish.sh 0.3.7
This downloads the release binaries, copies them into platform packages, and publishes all 5 packages to npm.
How it works
- User runs
npm install -g @gitlawb/gl - npm resolves
optionalDependencies— only installs the matching platform package (viaos/cpufields) postinstallrunsinstall.jswhich copies binaries from the platform package intobin/glandgit-remote-gitlawbare now available in PATH
Adding to CI
Add this step after the Homebrew dispatch in your release workflow:
- name: Publish to npm
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
cd gl-npm
./scripts/publish.sh ${{ github.ref_name }}
Languages
Shell
62.3%
JavaScript
37.7%