Skip to content

Commit 354dc65

Browse files
committed
fix: install deps for rln package before building
1 parent b7eabf5 commit 354dc65

File tree

3 files changed

+26
-37
lines changed

3 files changed

+26
-37
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,30 +116,35 @@ jobs:
116116
- run: npm install
117117
if: ${{ steps.release.outputs.releases_created }}
118118

119+
- run: npm run build
120+
if: ${{ steps.release.outputs.releases_created }}
121+
119122
- name: Setup Foundry
120123
if: ${{ steps.release.outputs.releases_created }}
121124
uses: foundry-rs/foundry-toolchain@v1
122125
with:
123126
version: nightly
124127

125-
- name: Generate RLN contract ABIs and verify build
128+
- name: Generate RLN contract ABIs
129+
id: rln-abi
126130
if: ${{ steps.release.outputs.releases_created }}
127131
run: |
128132
cd packages/rln
129133
npm run setup:contract-abi || {
130134
echo "::warning::Failed to generate contract ABIs, marking @waku/rln as private to skip publishing"
131135
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));"
132-
exit 0
136+
echo "failed=true" >> $GITHUB_OUTPUT
133137
}
134-
npm run build || {
138+
139+
- name: Rebuild with new ABIs
140+
if: ${{ steps.release.outputs.releases_created && steps.rln-abi.outputs.failed != 'true' }}
141+
run: |
142+
npm install -w packages/rln
143+
npm run build -w @waku/rln || {
135144
echo "::warning::Failed to build @waku/rln, marking as private to skip publishing"
145+
cd packages/rln
136146
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));"
137-
exit 0
138147
}
139-
cd ../..
140-
141-
- run: npm run build
142-
if: ${{ steps.release.outputs.releases_created }}
143148
144149
- run: npm run publish
145150
if: ${{ steps.release.outputs.releases_created }}

.github/workflows/pre-release.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,32 @@ jobs:
2525

2626
- run: npm install
2727

28+
- run: npm run build
29+
2830
- name: Setup Foundry
2931
uses: foundry-rs/foundry-toolchain@v1
3032
with:
3133
version: nightly
3234

33-
- name: Generate RLN contract ABIs and verify build
35+
- name: Generate RLN contract ABIs
36+
id: rln-abi
3437
run: |
3538
cd packages/rln
3639
npm run setup:contract-abi || {
3740
echo "::warning::Failed to generate contract ABIs, marking @waku/rln as private to skip publishing"
3841
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));"
39-
exit 0
42+
echo "failed=true" >> $GITHUB_OUTPUT
4043
}
41-
npm run build || {
44+
45+
- name: Rebuild with new ABIs
46+
if: steps.rln-abi.outputs.failed != 'true'
47+
run: |
48+
npm install -w packages/rln
49+
npm run build -w @waku/rln || {
4250
echo "::warning::Failed to build @waku/rln, marking as private to skip publishing"
51+
cd packages/rln
4352
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));"
44-
exit 0
4553
}
46-
cd ../..
47-
48-
- run: npm run build
4954
5055
- run: npm run publish -- --tag next
5156
env:

package-lock.json

Lines changed: 1 addition & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)