Skip to content

Commit 93f2c4e

Browse files
authored
feat: create workflow for npm install (#1200)
1 parent 5ca94b1 commit 93f2c4e

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

.github/actions/npm/action.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: npm i
2+
3+
runs:
4+
using: "composite"
5+
steps:
6+
- run: npm i
7+
shell: bash
8+
if: contains('
9+
refs/heads/master
10+
refs/heads/release-please--branches--master
11+
', github.ref)
12+
- uses: bahmutov/npm-install@v1
13+
if: contains('
14+
refs/heads/master
15+
refs/heads/release-please--branches--master
16+
', github.ref) == false

.github/workflows/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/setup-node@v3
2121
with:
2222
node-version: ${{ env.NODE_JS }}
23-
- uses: bahmutov/npm-install@v1
23+
- uses: ./.github/actions/npm
2424
- run: npm run build
2525
- run: npm run check
2626
- run: npm run doc
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/setup-node@v3
3333
with:
3434
node-version: ${{ env.NODE_JS }}
35-
- uses: bahmutov/npm-install@v1
35+
- uses: ./.github/actions/npm
3636
- name: Generate protobuf code
3737
run: |
3838
npm run proto
@@ -51,7 +51,7 @@ jobs:
5151
- uses: actions/setup-node@v3
5252
with:
5353
node-version: ${{ env.NODE_JS }}
54-
- uses: bahmutov/npm-install@v1
54+
- uses: ./.github/actions/npm
5555
- run: npm run build:esm
5656
- run: npm run test:browser
5757

@@ -75,7 +75,7 @@ jobs:
7575
- uses: actions/setup-node@v3
7676
with:
7777
node-version: ${{ env.NODE_JS }}
78-
- uses: bahmutov/npm-install@v1
78+
- uses: ./.github/actions/npm
7979
- run: npm run build:esm
8080
- run: npm run test:node
8181
env:
@@ -129,7 +129,7 @@ jobs:
129129
with:
130130
node-version: ${{ env.NODE_JS }}
131131

132-
- uses: bahmutov/npm-install@v1
132+
- uses: ./.github/actions/npm
133133
- run: npm run build:esm
134134
- run: npm run test:node
135135
env:
@@ -170,7 +170,7 @@ jobs:
170170
git fetch origin
171171
git checkout origin/master
172172
173-
- uses: bahmutov/npm-install@v1
173+
- uses: ./.github/actions/npm
174174

175175
- name: build nwaku
176176
run: |

0 commit comments

Comments
 (0)