4.12.0-beta.0 #253
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for OIDC authentication with npm | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: "npm" | |
| registry-url: "https://registry.npmjs.org" | |
| # Node 24 ships with npm 11.x which includes OIDC support (requires 11.5.1+) | |
| - run: npm ci | |
| - run: npm run build --if-present | |
| - run: npm test | |
| - run: | | |
| version="$GITHUB_REF_NAME" | |
| # Sync version number to all package.json files | |
| npm run version $version | |
| if [[ $version == *"beta"* ]]; then | |
| tag=beta | |
| elif [[ $version == *"alpha"* ]]; then | |
| tag=alpha | |
| else | |
| tag=latest | |
| fi | |
| npm publish --access public --tag $tag \ | |
| --workspace core \ | |
| --workspace connect \ | |
| --workspace platforms \ | |
| --workspace platforms/evm/protocols \ | |
| --workspace platforms/solana/protocols \ | |
| --workspace platforms/cosmwasm/protocols \ | |
| --workspace platforms/algorand/protocols \ | |
| --workspace platforms/sui/protocols \ | |
| --workspace platforms/aptos/protocols \ | |
| --workspace platforms/stacks/protocols \ | |
| --workspace sdk | |
| # OIDC authentication is used automatically by npm CLI 11.5.1+ | |
| # No NPM_TOKEN secret needed - authentication happens via OpenID Connect | |
| # See: https://docs.npmjs.com/trusted-publishers/ |