File tree Expand file tree Collapse file tree 2 files changed +61
-0
lines changed Expand file tree Collapse file tree 2 files changed +61
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+ name : Create New Pre Release
5+
6+ on :
7+ release :
8+ types : [created]
9+
10+ jobs :
11+ build :
12+ if : " github.event.release.prerelease"
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v2
16+ - uses : actions/setup-node@v1
17+ with :
18+ node-version : 12
19+ - run : npm install
20+ - run : npm run build
21+ - run : npm test
22+
23+ publish-npm :
24+ if : " github.event.release.prerelease"
25+ needs : build
26+ runs-on : ubuntu-latest
27+ steps :
28+ - uses : actions/checkout@v2
29+ - uses : actions/setup-node@v1
30+ with :
31+ node-version : 12
32+ registry-url : https://registry.npmjs.org/
33+ - run : npm install
34+ - run : npm run build
35+ - run : npm install -g json
36+ - run : json -I -f package.json -e 'this.scripts.postinstall="echo done"'
37+ - run : npm publish --tag next
38+ env :
39+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
40+
41+ publish-gpr :
42+ if : " github.event.release.prerelease"
43+ needs : build
44+ runs-on : ubuntu-latest
45+ steps :
46+ - uses : actions/checkout@v2
47+ - uses : actions/setup-node@v1
48+ with :
49+ node-version : 12
50+ registry-url : https://npm.pkg.github.com/
51+ - run : npm install
52+ - run : npm run build
53+ - run : npm install -g json
54+ - run : json -I -f package.json -e 'this.name="@vip-git/react-jsonschema-form-material-ui"'
55+ - run : json -I -f package.json -e 'this.scripts.postinstall="echo done"'
56+ - run : npm publish --registry=https://npm.pkg.github.com --scope=public --tag next
57+ env :
58+ NODE_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
Original file line number Diff line number Diff line change 99
1010jobs :
1111 build :
12+ if : " !github.event.release.prerelease"
1213 runs-on : ubuntu-latest
1314 steps :
1415 - uses : actions/checkout@v2
2021 - run : npm test
2122
2223 publish-npm :
24+ if : " !github.event.release.prerelease"
2325 needs : build
2426 runs-on : ubuntu-latest
2527 steps :
3739 NODE_AUTH_TOKEN : ${{secrets.npm_token}}
3840
3941 publish-gpr :
42+ if : " !github.event.release.prerelease"
4043 needs : build
4144 runs-on : ubuntu-latest
4245 steps :
You can’t perform that action at this time.
0 commit comments