Skip to content

Instantly share code, notes, and snippets.

View LersCode's full-sized avatar
🐢

Lars B. LersCode

🐢
  • PRODYNA SE
  • Germany
View GitHub Profile
@LersCode
LersCode / private-npm-in-gh-actions.md
Last active July 25, 2024 10:01 — forked from nandorojo/private-npm-in-gh-actions.md
Use private NPM packages in your GitHub actions

1 NPM_TOKEN

Add an NPM_TOKEN secret on GitHub. Get your secret key from the NPM dashboard.

2 Add a step to your action

- name: Authenticate with private NPM package
  run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc