Skip to content

.github/workflows/pre-release.yml #261

.github/workflows/pre-release.yml

.github/workflows/pre-release.yml #261

Workflow file for this run

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
}
cd ../..
npm install -w packages/rln
cd packages/rln
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 }}