.github/workflows/pre-release.yml #260
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
| on: | |
| workflow_dispatch: | |
| env: | |
| NODE_JS: "24" | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| pre-release: | |
| name: pre-release | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: waku-org/js-waku | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_JS }} | |
| registry-url: "https://registry.npmjs.org" | |
| - run: npm install | |
| - name: Setup Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: nightly | |
| - name: Generate RLN contract ABIs and verify build | |
| run: | | |
| cd packages/rln | |
| npm run setup:contract-abi || { | |
| echo "::warning::Failed to generate contract ABIs, marking @waku/rln as private to skip publishing" | |
| node -e "const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); pkg.private = true; fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));" | |
| exit 0 | |
| } | |
| npm run build || { | |
| echo "::warning::Failed to build @waku/rln, marking as private to skip publishing" | |
| node -e "const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); pkg.private = true; fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));" | |
| exit 0 | |
| } | |
| cd ../.. | |
| - run: npm run build | |
| - run: npm run publish -- --tag next | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_JS_WAKU_PUBLISH }} |