mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-02 13:53:12 +00:00
* feat: use wagmi to generate contract types * feat: migrate rln from ethers to viem * fix: remove .gitmodules * fix: update readme * fix: refactor to use a single viem client object * fix: update comments, tsconfig * feat: remove membership event tracking * fix: script name in package.json and readme * fix: only allow linea sepolia * fix: consolidate viem types, typed window * fix: use viem to infer type of decoded event * fix: use js for generate abi script * feat: generate abi and build rln package as release condition * fix: check that eth_requestAccounts returns an array * fix: handle error messages * fix: use https instead of git for cloning in script * fix: add warning annotations for contract typings check * fix: install deps for rln package before building * fix: use pnpm when installing rln contracts * fix: use workspace flag to run abi script * fix: add ref to checkout action * fix: include pnpm in ci
63 lines
2.0 KiB
YAML
63 lines
2.0 KiB
YAML
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
|
|
ref: ${{ github.ref }}
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_JS }}
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
|
|
- run: npm install
|
|
|
|
- run: npm run build
|
|
|
|
- name: Setup Foundry
|
|
uses: foundry-rs/foundry-toolchain@v1
|
|
with:
|
|
version: nightly
|
|
|
|
- name: Generate RLN contract ABIs
|
|
id: rln-abi
|
|
run: |
|
|
npm run setup:contract-abi -w @waku/rln || {
|
|
echo "::warning::Failed to generate contract ABIs, marking @waku/rln as private to skip publishing"
|
|
cd packages/rln
|
|
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));"
|
|
echo "failed=true" >> $GITHUB_OUTPUT
|
|
}
|
|
|
|
- name: Rebuild with new ABIs
|
|
if: steps.rln-abi.outputs.failed != 'true'
|
|
run: |
|
|
npm install -w packages/rln
|
|
npm run build -w @waku/rln || {
|
|
echo "::warning::Failed to build @waku/rln, marking as private to skip publishing"
|
|
cd packages/rln
|
|
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));"
|
|
}
|
|
|
|
- run: npm run publish -- --tag next
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_JS_WAKU_PUBLISH }}
|