Github action to create a package not firing when release created - Stack Overflow

I'm trying to automatically create a package whenever I publish a release to my private repo, so t

I'm trying to automatically create a package whenever I publish a release to my private repo, so that I can use that package as a private dependency in another project.

To this end I have a file at /.github/workflows/release-package.yaml, as per this guide, with the following content:

   name: Node.js Package
    on:
      release:
        types: [created]
    jobs:
      build:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: 16
          - run: npm ci
          - run: npm test
      publish-gpr:
        needs: build
        runs-on: ubuntu-latest
        permissions:
          packages: write
          contents: read
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: 16
              registry-url: /
          - run: npm ci
          - run: npm publish
            env:
              NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

But the action never runs - if I go to Actions, I see it, but it says no workflow runs, and subsequently the package is never created. There is no feedback - just nothing happens.

In my package.json the relevant parts are:

{
  ...
  "owner": "@my-gh-user/shared-code",
  "publishConfig": {
    "@my-gh-username:registry": ";
  }
  ...
}

What am I doing wrong?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745284579a4620484.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信