foundry-js
The foundry binary published to npmjs. See all the available versions here.
Install
npm install foundry-js@nightly
# or install globally
# npm install -g foundry-js@nightly-0.2.0
# or specify a release tag (version)
# npm install foundry-js@nightly-0.2.0-a170021
Usage
If installed globally:
forge -V
# forge 0.2.0 (a170021 2024-02-16T00:17:36.445247161Z)
If installed locally:
npx forge -V
# forge 0.2.0 (a170021 2024-02-16T00:17:36.445247161Z)
Development
Set up the Github Actions
- Clone the repository.
- Change the package name in
package.json. Don't alter the version (leave it to 1.0.0), as the version will be self managed by the Github Actions. - Add your npm token to the Github Actions repository secrets: NODE_AUTH_TOKEN = .
Publish workflow
.github/workflows/publish.ymlis triggered either scheduled-ly or manually.- This workflow will set the npm token and execute
ci.sh. - In
ci.sh, it will fetch all releases offoundry, and check if there is a new release. - If there is, it will download the pre-compiled binary using
download.jsand publish it to npm. bin/<>-delegate.sh(e.g.,bin/forge-delegate.sh) will link the pre-compiled binary to the PATH while installing the package, and handle different architectures (currently support linux-amd64, linux-arm64, darwin-amd64 and darwin-arm64).