File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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 : Node.js Package
5-
1+ name : Publish package to GitHub Packages
62on :
7- push :
8- # Sequence of patterns matched against refs/heads
9- branches :
10- # Push events on main branch
11- - master
12-
3+ release :
4+ types : [created]
135jobs :
14- build-and-deploy :
15- runs-on : ubuntu-latest
6+ build :
7+ runs-on : ubuntu-latest
8+ permissions :
9+ contents : read
10+ packages : write
1611 steps :
17- - name : Checkout 🛎️
18- uses : actions/checkout@v2
19-
20- - name : Install and Build 🔧
21- run : |
22- npm install
23- npm run build
24-
25- - name : Deploy 🚀
26- uses : JamesIves/github-pages-deploy-action@4.1.5
12+ - uses : actions/checkout@v3
13+ # Setup .npmrc file to publish to GitHub Packages
14+ - uses : actions/setup-node@v3
2715 with :
28- branch : gh-pages # The branch the action should deploy to.
29- folder : demo/dist # The folder the action should deploy.
30-
31- publish-npm :
32- runs-on : ubuntu-latest
33- steps :
34- - uses : actions/checkout@v2
35- # Setup .npmrc file to publish to npm
36- - uses : actions/setup-node@v2
37- with :
38- node-version : " 12.x"
39- registry-url : " https://registry.npmjs.org"
40- - run : npm install
16+ node-version : ' 16.x'
17+ registry-url : ' https://npm.pkg.github.com'
18+ # Defaults to the user or organization that owns the workflow file
19+ scope : ' @win11react'
20+ - run : npm ci
4121 - run : npm publish
4222 env :
43- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
23+ NODE_AUTH_TOKEN : ${{ secrets.BOT }}
You can’t perform that action at this time.
0 commit comments