Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.
/ npm-auth-gpr Public archive

Authenticate npm for consuming and publishing packages from and to the GitHub Package Registry

License

Notifications You must be signed in to change notification settings

jgierer12/npm-auth-gpr

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Warning This project is not actively maintained anymore

npm-auth-gpr

This action authenticates npm for consuming and publishing packages from and to the GitHub Package Registry.

Usage

Make sure your project's local .npmrc and package.json is set up with the right repository scope and URL. Take a look at the docs or my step-by-step guide on how to do this.

steps:
  - uses: actions/checkout@v1
  - uses: actions/setup-node@v1
    with:
      node-version: ${{ matrix.node-version }}
  - uses: jgierer12/npm-auth-gpr@v1
    with:
      token: ${{ secrets.GITHUB_TOKEN }}
  - run: npm install
  - run: npm publish

secrets.GITHUB_TOKEN is included in every GitHub Action's virtual environment by default. You should be able to use it without any further setup. Of course, you can also use a different token instead. This is useful if, for example, you want to publish a repo different from the current one.

License

MIT © 2019 Jonas Gierer

About

Authenticate npm for consuming and publishing packages from and to the GitHub Package Registry

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published