Description
Not entirely sure if this is an issue or a misconfiguration on my part but any guidence would be greatly appreciated.
I've been trying to setup a private registry that I can use to host various Unity packages that I've created over the years in a single location, using this tool to automatically publish updates.
I setup the GitHub action following the example in the readme for the package with some slight tweaks to point it at my custom package registry.
on:
push:
branches: [ packages ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10
- run: npm install
- name: NPM Publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
registry: [RegistryAddress:Port] # Substituted for privacy
package: ${{ github.workspace }}/Assets/MCU_Core/package.json
Everything appears to work, running with dry-run: true
runs through the action as one would expect. It generates a package and stops short of publishing it. When the version in the package.json is not modified it's able to read the previous version and not publish the package.
But when trying to run the actual action to publish updates, I seem unable to fix the npm ERR! code E401 Unable to authenticate, your authentication token seems to be invalid
error that is caused. I've used powershell with my authentication token to call npm publish --registry=[RegistryAddress:Port]/:_authToken=[AutomationAuthToken]
manually with success. I've crawled through the forum posts to try and determine what the cause could be (package.json setup, npmjs.com account verification etc.).
I've attached the log for the NPM Publish step in case that's any help
NPMPublishStep.log
Any assistance in resolving this would be greatly appreciated, just starting out with this kind of setup and am open to any suggestions you may have.