Skip to content

Commit f8b5a7b

Browse files
committed
build(ci): set up Node.js for GitHub Packages and npm publishing
1 parent 6ba1572 commit f8b5a7b

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ jobs:
7979

8080
- run: corepack enable
8181

82-
- name: Set up Node.js
82+
# Publish to GitHub Packages
83+
- name: Set up Node.js for GitHub Packages
8384
uses: actions/setup-node@v4
8485
with:
8586
node-version: "20"
@@ -98,3 +99,16 @@ jobs:
9899
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99100
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100101
run: npx semantic-release
102+
103+
# Publish to npmjs.com
104+
- name: Set up Node.js for npm
105+
uses: actions/setup-node@v4
106+
with:
107+
node-version: "20"
108+
registry-url: "https://registry.npmjs.org"
109+
scope: "@exadev"
110+
111+
- name: Publish to npm
112+
env:
113+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
114+
run: npm publish

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
"type": "module",
4444
"types": "dist/index.d.ts",
4545
"publishConfig": {
46-
"registry": "https://npm.pkg.github.com",
4746
"access": "public"
4847
},
4948
"version": "1.0.0"
50-
}
49+
}

0 commit comments

Comments
 (0)