MetaMask / action-npm-publish

GitHub Action to publish to NPM
MIT License
8 stars 6 forks source link

Add a way to set a custom NPM registry #11

Open mcmire opened 1 year ago

mcmire commented 1 year ago

This change makes it possible to test actions that involve publishing of NPM packages because it allows us to point to a private NPM registry. For instance, you could run the action by saying:

- uses: MetaMask/action-npm-publish@v2
  with:
    npm-registry: https://npm.fury.io/yourusernamehere/
    npm-token: ${{ secrets.NPM_TOKEN }}
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

and now when a package is accessed or published, Gemfury will be used instead of the official NPM registry.

mcmire commented 1 year ago

Testing this in a fork, stand by...

mcmire commented 1 year ago

Moving this to draft until this is fully tested. I also think that we might want to add an explicit dry-run input as npm-token may be still required when using a custom NPM registry even to access packages. I will test that as well though.

mariosant commented 1 year ago

Hey! Any update on this? I would love to see this beauty merged!