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

Commit

Permalink
use npmrc github action
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusnewton committed Sep 20, 2021
1 parent ce958de commit cc6517f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/publish-npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ jobs:
publish:
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.ACCESS_TOKEN }}

- name: .npmrc file to publish to npm
uses: actions/setup-node@v2
with:
node-version: "12.x"
registry-url: "https://registry.npmjs.org"

- name: Install nix
uses: cachix/install-nix-action@v13
with:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ let
'';

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

0 comments on commit cc6517f

Please sign in to comment.