File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish package
2+
3+ on :
4+ release :
5+ types : [ published ]
6+
7+ jobs :
8+ publish-npm :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ - uses : actions/setup-node@v4
13+ with :
14+ node-version : ' 18.x'
15+ registry-url : https://registry.npmjs.org/
16+ - run : yarn install
17+ - run : yarn build
18+ - run : yarn publish
19+ env :
20+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
21+
22+ publish-github :
23+ runs-on : ubuntu-latest
24+ permissions :
25+ contents : read
26+ packages : write
27+ steps :
28+ - uses : actions/checkout@v3
29+ - uses : actions/setup-node@v3
30+ with :
31+ node-version : ' 18.x'
32+ registry-url : ' https://npm.pkg.github.com'
33+ scope : ' @devlive-community'
34+ - run : yarn install
35+ - run : yarn build
36+
37+ - name : Update package name
38+ run : |
39+ sed -i 's/"name": "pageforge"/"name": "@devlive-community\/pageforge"/' package.json
40+
41+ - run : |
42+ echo "//npm.pkg.github.com/:_authToken=${{ secrets.GH_PACKAGE_TOKEN }}" >> .npmrc
43+ echo "@devlive-community:registry=https://npm.pkg.github.com" >> .npmrc
44+ yarn publish --non-interactive --access public
45+ env:
46+ NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_TOKEN }}
You can’t perform that action at this time.
0 commit comments