Skip to content

Commit 486d936

Browse files
committed
switch to GitHub NPM registry
1 parent a84024d commit 486d936

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/build-and-publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ jobs:
2222
with:
2323
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
2424
- uses: aboutbits/github-actions-base/git-setup@v2
25+
- name: Configure npm for GitHub Packages
26+
run: |
27+
echo "@aboutbits:registry=https://npm.pkg.github.com" >> ~/.npmrc
28+
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> ~/.npmrc
2529
- uses: aboutbits/github-actions-node/build-and-publish-package@v3
2630
id: package
2731
with:
2832
node-version: ${{ env.NODE_VERSION }}
29-
registry-url: 'https://registry.npmjs.org'
30-
registry-token: ${{ secrets.NPM_TOKEN }}
33+
registry-url: 'https://npm.pkg.github.com'
34+
registry-token: ${{ secrets.GITHUB_TOKEN }}
3135
increment: ${{ github.event.inputs.increment }}
3236
preid: ${{ github.event.inputs.preid }}
3337
- uses: aboutbits/github-actions-base/github-create-release@v2

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
],
2020
"private": false,
2121
"publishConfig": {
22+
"registry": "https://npm.pkg.github.com",
2223
"access": "public"
2324
},
2425
"prettier": "@aboutbits/prettier-config",

0 commit comments

Comments
 (0)