File tree Expand file tree Collapse file tree 2 files changed +9
-44
lines changed Expand file tree Collapse file tree 2 files changed +9
-44
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
1+ name : publish npm
32
4- name : Release
53on :
6- push :
7- branches :
8- - main
9- - next
10- jobs :
114 release :
5+ types : [published]
6+
7+ jobs :
8+ publish-npm :
129 runs-on : ubuntu-latest
1310 steps :
14- - name : Get npm cache directory
15- id : npm-cache
16- run : |
17- echo "::set-output name=dir::$(npm config get cache)"
18- - uses : actions/cache@v3
19- with :
20- path : ${{ steps.npm-cache.outputs.dir }}
21- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22- restore-keys : |
23- ${{ runner.os }}-node-
2411 - uses : actions/checkout@v3
25- - name : Setup Node.js
26- uses : actions/setup-node@v3
27- with :
28- node-version : 16
29- registry-url : https://registry.npmjs.org/
30-
31- - name : Install dependencies
32- run : npm install
33-
34- - name : Test
35- run : npm test
36-
37- - name : publish npm
38- run : npm publish
39- env :
40- NODE_AUTH_TOKEN : ${{secrets.npm_token}}
41-
42- - name : Publish GHP
4312 - uses : actions/setup-node@v3
4413 with :
4514 node-version : 16
46- registry-url : https://npm.pkg.github.com/
47- - run : npm install
15+ registry-url : https://registry.npmjs.org/
4816 - run : npm publish
4917 env :
50- NODE_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN }}
18+ NODE_AUTH_TOKEN : ${{secrets.npm_token }}
Original file line number Diff line number Diff line change 11{
22 "name" : " create-html5-boilerplate" ,
3- "version" : " 0.2 .0" ,
3+ "version" : " 1.0 .0" ,
44 "description" : " An npm based quickstart app for HTML5-Boilerplate" ,
55 "keywords" : [],
66 "homepage" : " https://html5boilerplate.com/" ,
2222 "test" : " node --experimental-vm-modules ./node_modules/jest/bin/jest.js" ,
2323 "lint" : " eslint lib/cli.js" ,
2424 "format" : " prettier --write \" ./cli.js\" \" tests/*.js\" " ,
25- "coverage" : " node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage --collectCoverageOnlyFrom ./lib/cli.js" ,
26- "semantic-release" : " semantic-release"
25+ "coverage" : " node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage --collectCoverageOnlyFrom ./lib/cli.js"
2726 },
2827 "files" : [
2928 " lib/**/*" ,
4645 "yargs-parser" : " ^21.0.1"
4746 },
4847 "devDependencies" : {
49- "@semantic-release/changelog" : " ^6.0.1" ,
50- "@semantic-release/git" : " ^10.0.1" ,
5148 "eslint" : " ^8.18.0" ,
5249 "eslint-config-airbnb" : " ^19.0.4" ,
5350 "eslint-config-prettier" : " ^8.5.0" ,
You can’t perform that action at this time.
0 commit comments