Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to set a custom NPM registry #11

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Nov 10, 2022

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.

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:

``` yaml
- 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](https://gemfury.com/help/npm-registry/) will be used instead
of the official NPM registry.
@mcmire mcmire requested a review from a team as a code owner November 10, 2022 17:19
@mcmire
Copy link
Contributor Author

mcmire commented Nov 10, 2022

Testing this in a fork, stand by...

@mcmire mcmire marked this pull request as draft November 10, 2022 17:56
@mcmire
Copy link
Contributor Author

mcmire commented Nov 10, 2022

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
Copy link
Contributor

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

jeffsmale90 pushed a commit that referenced this pull request Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants