title: Github actions: NPM publish 404 not found
body: <p>In my github project Im trying to automatically create a new version and publish it to NPM whenever something is pushed to the master branch.</p>
  <p>The idea</p>
  <ol>
  <li>Create a new minor version</li>
  <li>Publish the package to NPM</li>
  </ol>
  <p>Im using github actions. My workflow file looks like this:</p>
  <pre><code># This workflow will run tests using node and then publish a package to the npm registry when a release is created
  # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
  
  name: Node.js Package
  
  on:
  #trigger on every commit to the main branch
    push:
      branches:
        - main
        - master 
  
  jobs:
    build:
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
        - uses: actions/setup-node@v1
          with:
            node-version: 12
        - run: npm test
  
    publish-npm:
      needs: build
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
        - uses: actions/setup-node@v1
          with:
            node-version: 12
            registry-url: https://registry.npmjs.org/
        - run: git config user.name $GITHUB_ACTOR
        - run: git config user.email gh-actions-${GITHUB_ACTOR}@github.com
        - run: git remote add gh-origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
        - run: echo &quot;//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN&quot; &gt;&gt; ~/.npmrc
        - run: npm version patch
        - run: npm publish
        - run: git push gh-origin HEAD:master --tags
          env:
            NODE_AUTH_TOKEN: ${{secrets.npm_token}}
            GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
  </code></pre>
  <p>(<a href="https://github.com/ether/ep_align/actions/runs/322527776" rel="noreferrer">https://github.com/ether/ep_align/actions/runs/322527776</a>)</p>
  <p>I keep getting a 404 error when doing the publish. Which I dont' understand because the package is online here: <a href="https://www.npmjs.com/package/ep_align" rel="noreferrer">https://www.npmjs.com/package/ep_align</a></p>
  <pre><code>npm ERR! code E404
  npm ERR! 404 Not Found - PUT https://registry.npmjs.org/ep_align - Not found
  npm ERR! 404 
  npm ERR! 404  'ep_align@0.2.7' is not in the npm registry.
  npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
  npm ERR! 404 
  npm ERR! 404 Note that you can also install from a
  npm ERR! 404 tarball, folder, http url, or git url.
  </code></pre>
  <p>This problem is driving me nuts for a few hours now, and I have no idea what it could be.
  Any ideas?</p>