Skip to content

Commit b0752f2

Browse files
committed
ci(GitHubAction): support publish npm package to github package registry
1 parent 8757e9e commit b0752f2

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,12 @@ jobs:
5959
run: npm run build
6060
- name: Publish package to NPM registry
6161
run: npm publish --access public
62+
- uses: actions/setup-node@v4
63+
with:
64+
node-version: ${{ matrix.version }}
65+
registry-url: 'https://npm.pkg.github.com'
66+
scope: '@make-everything-simple'
67+
- name: Publish package to NPM registry
68+
run: npm publish --access public
69+
env:
70+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@make-everything-simple/npm-template-typescript",
3-
"version": "0.0.5-test",
3+
"version": "0.0.6-test",
44
"description": "Typescript template to build npm package",
55
"main": "./dist/index.js",
66
"module": "./dist/index.mjs",
@@ -22,7 +22,7 @@
2222
},
2323
"repository": {
2424
"type": "git",
25-
"url": "git+https://github.com/lengocduy/npm-template-typescript.git"
25+
"url": "git+https://github.com/make-everything-simple/npm-template-typescript.git"
2626
},
2727
"keywords": [
2828
"npm",
@@ -33,9 +33,9 @@
3333
"author": "Le Ngoc Duy",
3434
"license": "MIT",
3535
"bugs": {
36-
"url": "https://github.com/lengocduy/npm-template-typescript/issues"
36+
"url": "https://github.com/make-everything-simple/npm-template-typescript/issues"
3737
},
38-
"homepage": "https://github.com/lengocduy/npm-template-typescript#readme",
38+
"homepage": "https://github.com/make-everything-simple/npm-template-typescript#readme",
3939
"devDependencies": {
4040
"@tsconfig/node18": "^18.2.2",
4141
"@types/jest": "^29.5.11",

0 commit comments

Comments
 (0)