File tree Expand file tree Collapse file tree 2 files changed +54
-3
lines changed Expand file tree Collapse file tree 2 files changed +54
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : experimental-inventory-cli - Publish to NPM
2
+ on :
3
+ workflow_dispatch :
4
+ inputs :
5
+ version :
6
+ description : ' release version without v prefix'
7
+ required : true
8
+ type : string
9
+ permissions :
10
+ contents : read
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Harden Runner
17
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
18
+ with :
19
+ egress-policy : audit
20
+
21
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
22
+
23
+ # Setup .npmrc file to publish to npm
24
+ - uses : actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
25
+ with :
26
+ node-version : ' 18.x'
27
+ registry-url : ' https://registry.npmjs.org'
28
+
29
+ - name : check version matches input
30
+ run : |
31
+ grep "\"version\": \"${{ github.event.inputs.version }}\"," package.json
32
+ working-directory : ./experimental/li-cli
33
+
34
+ - run : npm ci
35
+ working-directory : ./experimental/li-cli
36
+
37
+ - run : npm run build
38
+ working-directory : ./experimental/li-cli
39
+
40
+ - run : npm publish --access=public
41
+ working-directory : ./experimental/li-cli
42
+ env :
43
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1
1
name : experimental-inventory - Publish to NPM
2
2
on :
3
- push :
4
- tags :
5
- - ' license-inventory-*'
3
+ workflow_dispatch :
4
+ inputs :
5
+ version :
6
+ description : ' release version without v prefix'
7
+ required : true
8
+ type : string
6
9
permissions :
7
10
contents : read
8
11
23
26
node-version : ' 18.x'
24
27
registry-url : ' https://registry.npmjs.org'
25
28
29
+ - name : check version matches input
30
+ run : |
31
+ grep "\"version\": \"${{ github.event.inputs.version }}\"," package.json
32
+ working-directory : ./experimental/license-inventory
33
+
26
34
- run : npm ci
27
35
working-directory : ./experimental/license-inventory
28
36
You can’t perform that action at this time.
0 commit comments