Skip to content

Commit c7b1ca8

Browse files
set .npmrc (#1109)
1 parent 9a292d5 commit c7b1ca8

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/CI.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,14 @@ jobs:
7575

7676
- name: Publish
7777
if: ${{ success() && runner.os == 'Linux' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
78-
run: npm publish --tag next --no-git-tag-version --prepatch --preid "$(git rev-parse --short HEAD)"
78+
run: |
79+
{
80+
echo "registry=https://registry.npmjs.com"
81+
echo "//registry.npmjs.com/:_authToken=${NPM_TOKEN}"
82+
} > .npmrc
83+
npm publish --tag next --no-git-tag-version --prepatch --preid "$(git rev-parse --short HEAD)"
7984
env:
80-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
85+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
8186

8287
# Setup QEMU as requirement for docker
8388
- name: Set up QEMU

.github/workflows/release.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,19 @@ jobs:
4545
- name: Run Check Dependencies
4646
run: npm run check-dependencies
4747

48+
# Config .npmrc
49+
- name: Config .npmrc
50+
run: |
51+
{
52+
echo "registry=https://registry.npmjs.com"
53+
echo "//registry.npmjs.com/:_authToken=${NPM_TOKEN}"
54+
} > .npmrc
55+
4856
# Publish to npm
4957
- name: Publish to npm
5058
run: npm publish --access public
5159
env:
52-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
60+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
5361

5462
# Get the current package.json version so we can tag the image correctly
5563
- name: Get current package.json version

0 commit comments

Comments
 (0)