Publish to github packages fails

Hi everyone!

I’m using a workflow template for publishing to github packages (and npmjs), and didn’t really modify it. The npmjs publish succeeds, but the github one fails.

I’m curious if anyone can shed a light as to what I’m doing wrong?

My project is open source, so I hope this is visible:

The specific error is around npm ci:

npm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/@curveball%2fcore - Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.

This is about a dependency that’s also on github packages and public:

How can I further debug this?

This was fixed.

I don’t think the standard npm publish template is correct, so I ended up making a bunch of changes to how it’s done. Updated to the new setup-node@v2, and only logging into github on the final ‘publish’ step instead of before the ci step.