File tree Expand file tree Collapse file tree 4 files changed +58
-20
lines changed Expand file tree Collapse file tree 4 files changed +58
-20
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Publish
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ jobs :
7
+ build-and-push :
8
+ uses : elastic-ipfs/core-lib/.github/workflows/package-shared-build.yaml@main
9
+ with :
10
+ npm_push : true
11
+ secrets :
12
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : ' Shared build flow'
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ npm_push :
7
+ type : boolean
8
+ description : Whether to push after build
9
+ required : false
10
+ secrets :
11
+ NPM_TOKEN :
12
+ required : false
13
+ description : Only required if pushing no npm
14
+ jobs :
15
+ build-and-push :
16
+ runs-on : ubuntu-latest
17
+ strategy :
18
+ matrix :
19
+ node-version : [18.12]
20
+ steps :
21
+ - uses : actions/checkout@v3
22
+ - name : Use Node.js ${{ matrix.node-version }}
23
+ uses : actions/setup-node@v3
24
+ with :
25
+ node-version : ${{ matrix.node-version }}
26
+ registry-url : ' https://registry.npmjs.org'
27
+ - name : Install Dependencies
28
+ run : npm install --ignore-scripts
29
+ - name : Lint
30
+ run : npm run lint
31
+ - name : Test
32
+ run : npm run test:ci
33
+ - run : npm publish
34
+ if : inputs.npm_push
35
+ env :
36
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : PR | Build
2
+ on :
3
+ pull_request :
4
+ branches :
5
+ - main
6
+ jobs :
7
+ build :
8
+ uses : elastic-ipfs/core-lib/.github/workflows/package-shared-build.yaml@main
9
+ with :
10
+ npm_push : false
You can’t perform that action at this time.
0 commit comments