Skip to content

Unable to publish Github package #269

Closed
@Zenoo

Description

@Zenoo

I am trying to setup a workflow that publishes a Github package, but I can't seem to make it work.

Here is a simplified workflow I created to try it:

https://github.com/Zenoo/slick-loader/blob/master/.github/workflows/npm-publish.yml

name: Node.js Package

on:
  workflow_dispatch:

jobs:
  publish-gpr:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: 12
          registry-url: https://npm.pkg.github.com/
      - run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

But the process always fails:

npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/slick-loader - Not found
npm ERR! 404 
npm ERR! 404  'slick-loader@1.1.35' 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.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-06-16T08_47_48_768Z-debug.log
Error: Process completed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions