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 11name : experimental-inventory - Publish to NPM
22on :
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
69permissions :
710 contents : read
811
2326 node-version : ' 18.x'
2427 registry-url : ' https://registry.npmjs.org'
2528
29+ - name : check version matches input
30+ run : |
31+ grep "\"version\": \"${{ github.event.inputs.version }}\"," package.json
32+ working-directory : ./experimental/license-inventory
33+
2634 - run : npm ci
2735 working-directory : ./experimental/license-inventory
2836
You can’t perform that action at this time.
0 commit comments