Skip to content

Creating an npm package #37555

Answered by antonblr
queejie asked this question in Packages
Oct 27, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi @queejie - GITHUB_TOKEN gets injected automatically for every github action job run. You just referencing it whenever you need like ${{ secrets.GITHUB_TOKEN }}

For example, if you want to publish it to GitHub packages (as opposite to npm registry) you'd reference it as follows:

- run: npm publish
  env:
    NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

See full workflow example here - https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#example-workflow

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@queejie
Comment options

@antonblr
Comment options

Answer selected by queejie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packages Host your dependencies, libraries, and production-ready code, right from your repository Product Feedback
2 participants