Skip to content

Commit

Permalink
Use .npmrc to set auth in publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
spenserblack committed Nov 15, 2024
1 parent ac2663b commit f313498
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
with:
node-version: "22.x"
cache: pnpm
- name: Setup .npmrc
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm install
- run: pnpm publish --recursive --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,6 @@ dist
# Ignore build mistakes
**/src/*.js
**/src/*.d.ts

# Created during publish workflow
/.npmrc

0 comments on commit f313498

Please sign in to comment.