Comments (3)
Update Explanation: actions/setup-node
creates an auth file when the registry-url exists and uses NODE_AUTH_TOKEN
then puts that path in the NPM_CONFIG_USERCONFIG
environment variable. I believe this now overrides the use of the .npmrc file and why it's not used.
I wonder if changesets/action
should maybe check for NPM_CONFIG_USERCONFIG
existing before it writes out the .npmrc
file and/or log out an explanation.
Maybe someone can explain if this is true or clear up any misunderstanding.
from action.
I don't think this .npmrc
is even being used by changesets.
I found that using action/node-setup
and the registry-url
you need to set NODE_AUTH_TOKEN
I had to replace my env.NPM_TOKEN
with env.NODE_AUTH_TOKEN
because I'm using actions/node-setup
and changesets is working fine without the NPM_TOKEN
.
from action.
For a CI action to be hard-coded to only check $HOME/.npmrc
is pretty bad imo. At least self-hosted runners are often stateful, and potentially concurrent, so adding files to a shared directory should be avoided. Especially since the action doesn't clean up after itself.
As a workaround I opted to change the $HOME
variable during the run. Not ideal, but it appears to work just fine. If someone knows how to set $HOME using jobs.steps.env, then that would be even better.
# changesets/action presumes the .npmrc is in $HOME
# See:
# - https://github.com/changesets/action/issues/58
# - https://github.com/changesets/action/blob/2bb9bcbd6bf4996a55ce459a630a0aa699457f59/src/index.ts#L58
- name: Set HOME
run: echo "HOME=$(pwd)" >> $GITHUB_ENV
Edit: use jobs.steps.env
like this, as shown in #147
env:
HOME: ${{ github.workspace }}
from action.
Related Issues (20)
- Publish not working for internal Artifactory registry HOT 4
- Workflow of git action throw error while we setup `type:module` on package.json HOT 2
- Avoid marking releases as Latest
- Github action fail with changeset publish
- Error "No user .npmrc file found" when file actually exists HOT 2
- Any plans to verify changesets org w/ GitHub and publish to Marketplace
- pathspec 'changeset-release/main' did not match any file(s) known to git HOT 6
- HttpError: Not Found HOT 9
- There is no .changeset folder
- How can I change release body content and title?
- actuon HOT 1
- action
- Major version bump where minor is set HOT 1
- useCalculatedVersion option not working HOT 1
- Support private registry
- action formatting package.json in wrong way HOT 1
- How can I automate version updates and releases?
- Suggestion: add input to specify the target branch
- Selective release HOT 1
- [Question] Protected branches HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action.