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

Allow actions to specify target registry domain to publish #309

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

Conversation

rayriffy
Copy link

@rayriffy rayriffy commented Jul 1, 2023

At the moment GitHub Actions will create .npmrc that only point to default's NPM registry (which is registry.npmjs.org). This actions option will allow user to change registry domain that script will create, and configure.

@changeset-bot
Copy link

changeset-bot bot commented Jul 1, 2023

🦋 Changeset detected

Latest commit: 4c56449

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/action Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@luisfagottani
Copy link

Hey @ImadBoumzaoued, we need this feat to be able to define a custom registry url. Can you merge this, plz!!?

@Andarist
Copy link
Member

We only create .npmrc if there is none already. The preferred solution to this is to include a preparation step like this one:

- name: Creating .npmrc
  run: |
    cat << EOF > "$HOME/.npmrc"
      //registry.npmjs.org/:_authToken=$NPM_TOKEN
    EOF
  env:
    NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

You can control your target registry in the .npmrc that you create.

@luisfagottani
Copy link

That's right @Andarist, but I didin't need the home variable, just created with .npmrc path and works.

The only thing I think it's a little strange is the output from changeset warning me that doesn't exist a npm user file, even if I created an step before.

image

Otherwise, all good.

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.

4 participants