This repository was archived by the owner on Jan 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +27
-27
lines changed Expand file tree Collapse file tree 3 files changed +27
-27
lines changed Original file line number Diff line number Diff line change 1- name : Publish NPM Package
1+ name : Node.js Package
22
33on :
4- push :
5- # branches:
6- # - main
4+ release :
5+ # types: [created]
76
87jobs :
9- publish :
8+ build :
109 runs-on : ubuntu-latest
11-
1210 steps :
13- - name : Checkout Repository
14- uses : actions/checkout@v2
15-
16- - name : Set up Node.js
17- uses : actions/setup-node@v2
11+ - uses : actions/checkout@v4
12+ - uses : actions/setup-node@v3
1813 with :
1914 node-version : 20.5.1
15+ - run : npm ci
16+ - run : npm test
2017
21- - name : Install Dependencies
22- run : npm install
23-
24- # - name: Build Package
25- # run: npm run build
26-
27- - name : Print Environment Variables
28- run : |
29- printenv
30-
31- - name : Publish to NPM
32- run : |
33- echo "NPM_TOKEN: ${{ secrets.NPM_TOKEN }}"
34- npm whoami
35- npm publish --access=public
18+ publish-gpr :
19+ needs : build
20+ runs-on : ubuntu-latest
21+ permissions :
22+ packages : write
23+ contents : read
24+ steps :
25+ - uses : actions/checkout@v4
26+ - uses : actions/setup-node@v3
27+ with :
28+ node-version : 16
29+ registry-url : https://npm.pkg.github.com/
30+ - run : npm ci
31+ - run : npm publish
3632 env :
37- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
33+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
Original file line number Diff line number Diff line change 1+ @canopassoftware:registry = https://npm.pkg.github.com
Original file line number Diff line number Diff line change 33 "version" : " 1.1.28" ,
44 "description" : " Show the preview of file and manage files data to upload" ,
55 "main" : " /src/app/index.ts" ,
6+ "publishConfig" : {
7+ "@canopassoftware:registry" : " https://npm.pkg.github.com"
8+ },
69 "repository" : {
710 "type" : " git" ,
811 "url" : " git+https://github.com/canopas/react-file-upload.git"
You can’t perform that action at this time.
0 commit comments