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
GitHub Action failing to find NPM_TOKEN #1821
Comments
There are extra instructions for publishing to the GitHub package registry. You need to use your GitHub token to publish since you're not publishing to NPM anymore NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Here is an example repo where it's working. |
@hipstersmoothie Many thanks for the help. I see the docs have been updated since I originally set up the Action, but it seems like they still don't include all the steps. I had to add these lines to my Node setup as well (noticed in your demo repo):
I was also still seeing the NPM_TOKEN warning message. Adding it back in as an environment secret appears to have fixed that i.e.
Finally, with all that setup I was able to merge a PR and have Auto do it's thing, releasing a new package and updating version/changelog 🎉 However I had disabled branch protection whilst fiddling around; re-enabling it caused a new error where everytime Auto attempted to commit the version updates it would fail. I've worked around that by adding a new personal GitHub token and referencing that as a secret, instead of the default
Doesn't seem like the best solution, so if anyone knows of a better one I'd appreciate it. Alternatively, I think the docs may need updating here: https://intuit.github.io/auto/docs/build-platforms/github-actions#running-with-branch-protection |
I've made a PR to improve those docs. Would you mind reviewing #1828? |
Reviewed, couple of small suggestions but all looks good ☺Thanks again for all your help |
🚀 Issue was released in |
I'm trying to switch from publishing directly to npm (which worked fine) to using GitHub Packages with an organisation scoped package name.
I've changed my package name in
package.json
, added the necessarypublishConfig
e.g.And changed my Action steps to use
NODE_AUTH_TOKEN
instead ofNPM_TOKEN
as per the docs, but when I merge a branch and trigger the action I get the following warning and the package is never published (though version tags and changelog are updated, so annoyingly it doesn't flag as a failed run):NPM_TOKEN
is set in my repository Secrets on GitHub.Here's the Action setup:
The text was updated successfully, but these errors were encountered: