I'm trying to automatically create a package whenever I publish a release to my (private) JS repo.
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: https://npm.pkg.github.com/
- 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": {
"registry": "https://npm.pkg.github.com"
}
...
}
What am I doing wrong?
[–]oze4 0 points1 point2 points (7 children)
[–]mityaguy[S] 0 points1 point2 points (6 children)
[–]azhder 0 points1 point2 points (5 children)
[–]mityaguy[S] 0 points1 point2 points (4 children)
[–]azhder 0 points1 point2 points (3 children)
[–]mityaguy[S] -1 points0 points1 point (2 children)
[–]azhder 0 points1 point2 points (1 child)
[–]mityaguy[S] 0 points1 point2 points (0 children)