File tree Expand file tree Collapse file tree 1 file changed +10
-24
lines changed
Expand file tree Collapse file tree 1 file changed +10
-24
lines changed Original file line number Diff line number Diff line change 1- name : Publish to GitHub Packages
1+ name : NPM Publish
22
33on :
44 release :
@@ -10,33 +10,19 @@ permissions:
1010 packages : write
1111
1212jobs :
13- publish :
13+ build :
1414 runs-on : ubuntu-latest
15-
1615 steps :
17- - name : Checkout
18- uses : actions/checkout@v4
19-
20- - name : Use Node.js 20
21- uses : actions/setup-node@v4
16+ - uses : actions/checkout@v4
17+ - uses : actions/setup-node@v4
2218 with :
2319 node-version : 20
24- registry-url : https://npm.pkg.github.com/
25-
26- - name : Install dependencies
27- run : npm ci
28-
29- - name : Build
20+ registry-url : ' https://registry.npmjs.org'
21+ - run : npm ci
22+ - name : Build distribution
3023 run : npm run build:dist
3124
32- - name : Sync version from tag
33- run : |
34- TAG="${GITHUB_REF_NAME}" # for example. v1.2.3
35- VERSION="${TAG#v}" # 1.2.3
36- echo "Version from tag: $VERSION"
37- npm version "$VERSION" --no-git-tag-version
38-
39- - name : Publish
25+ - name : Publish to npm
26+ run : npm publish --access public
4027 env :
41- NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42- run : npm publish
28+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments