File tree Expand file tree Collapse file tree 3 files changed +47
-12
lines changed
Expand file tree Collapse file tree 3 files changed +47
-12
lines changed Original file line number Diff line number Diff line change 1+ name : Node.js CI
2+
3+ on :
4+ push :
5+ branches : ['main']
6+ pull_request :
7+ branches : ['main']
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ node-version : ['20.x', '22.x', '24.x']
15+ steps :
16+ - uses : actions/checkout@v5
17+ - name : Use Node.js ${{ matrix.node-version }}
18+ uses : actions/setup-node@v6
19+ with :
20+ node-version : ${{ matrix.node-version }}
21+ - run : yarn install --frozen-lockfile --ignore-scripts
22+ - run : yarn build
Original file line number Diff line number Diff line change 11name : Node.js Package
22on :
33 release :
4- types : [created ]
4+ types : [published ]
55jobs :
6- build :
6+ buildForNpm :
77 runs-on : ubuntu-latest
8+ permissions :
9+ contents : read
10+ id-token : write
811 steps :
9- - uses : actions/checkout@v2
10- # Setup .npmrc file to publish to npm
11- - uses : actions/setup-node@v2
12+ - uses : actions/checkout@v5
13+ - name : Change the organization for npm to @kubevirt-ui-ext
14+ run : jq '.name |= sub("@kubevirt-ui/";"@kubevirt-ui-ext/")' package.json > tmp.json && mv tmp.json package.json
15+ - uses : actions/setup-node@v6
1216 with :
13- node-version : ' 12.x '
17+ node-version : ' 20 '
1418 registry-url : ' https://registry.npmjs.org'
15- - run : npm install
16- - run : npm publish
19+ scope : ' @kubevirt-ui-ext'
20+ - name : Update npm for Trusted Publishing
21+ run : npm install -g npm@'>=11.5.1'
22+ - run : |
23+ npm version
24+ yarn install --frozen-lockfile --ignore-scripts
25+ - run : yarn build
26+ - run : npm publish --provenance --access public
1727 env :
18- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
28+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN_FOR_KUBEVIRT_UI_EXT }}
Original file line number Diff line number Diff line change 8989 "eslint-plugin-simple-import-sort" : " ^7.0.0" ,
9090 "eslint-plugin-unused-imports" : " ^2.0.0" ,
9191 "prettier" : " ^2.5.1" ,
92- "rimraf" :" 6.1.2" ,
92+ "rimraf" : " 6.1.2" ,
9393 "tslint" : " ^6.1.3" ,
9494 "tslint-etc" : " ^1.13.10" ,
9595 "tsup" : " ^8.5.0" ,
9898 "typescript" : " ^4.5.5"
9999 },
100100 "sideEffects" : false ,
101+ "engines" : {
102+ "node" : " >=20"
103+ },
101104 "tsup" : {
102105 "entry" : [
103106 " console/index.ts" ,
104- " containerized-data-importer/index.ts" ,
107+ " containerized-data-importer/index.ts" ,
105108 " kubevirt/index.ts" ,
106109 " kubernetes/index.ts" ,
107110 " nmstate/index.ts"
131134 "url" : " https://github.com/kubevirt-ui/kubevirt-api/issues"
132135 },
133136 "homepage" : " https://github.com/kubevirt-ui/kubevirt-api#readme"
134- }
137+ }
You can’t perform that action at this time.
0 commit comments