Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Commit cc6517f

Browse files
committed
use npmrc github action
1 parent ce958de commit cc6517f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/publish-npm.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ jobs:
88
publish:
99
runs-on: ubuntu-latest
1010
env:
11-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v2
1515
with:
1616
token: ${{ secrets.ACCESS_TOKEN }}
1717

18+
- name: .npmrc file to publish to npm
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: "12.x"
22+
registry-url: "https://registry.npmjs.org"
23+
1824
- name: Install nix
1925
uses: cachix/install-nix-action@v13
2026
with:

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shell.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ let
138138
'';
139139

140140
publish = pkgs.writeShellScriptBin "publish" ''
141-
echo //registry.npmjs.org/:_authToken=''${NPM_TOKEN} > .npmrc
142-
143141
PACKAGE_NAME=$(node -p "require('./package.json').name" | tr -d @ | tr / -)
144142
PACKAGE_VERSION=$(node -p "require('./package.json').version")
145143
npm pack

0 commit comments

Comments
 (0)