Skip to content

Commit c121585

Browse files
committed
Give up and use NPM_TOKEN
1 parent fd041e7 commit c121585

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
runs-on: ubuntu-latest
1616
permissions:
1717
contents: write
18-
id-token: write
1918

2019
steps:
2120
- name: Resolve tag to publish
@@ -71,8 +70,10 @@ jobs:
7170
echo "already_published=false" >> "$GITHUB_OUTPUT"
7271
fi
7372
74-
- run: npm publish --provenance --access public
73+
- run: npm publish --access public
7574
if: steps.npm_state.outputs.already_published != 'true'
75+
env:
76+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7677

7778
- name: Ensure GitHub Release exists
7879
env:

RELEASE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Use this checklist to cut a new npm release for `@aredotna/cli`.
55
Publishing is automated by GitHub Actions when a PR with a release label is merged to `main`.
66
Use exactly one label on the PR: `major`, `minor`, or `patch`.
77
The `Release` workflow bumps the version and pushes the release commit and tag.
8-
That tag then triggers the `Publish` workflow, which publishes to npm with trusted publishing (OIDC) and creates the GitHub Release.
8+
That tag then triggers the `Publish` workflow, which publishes to npm using the `NPM_TOKEN` GitHub secret and creates the GitHub Release.
99

1010
## 1) Preflight
1111

@@ -75,7 +75,7 @@ arena whoami --json
7575

7676
## Troubleshooting
7777

78-
- Publish job fails with OIDC/trusted publishing error: verify trusted publisher settings on npm exactly match `aredotna/cli` and workflow file `publish.yml`.
78+
- Publish job fails with npm auth error (401/404): verify the `NPM_TOKEN` repository secret exists and has permission to publish `@aredotna/cli`.
7979
- Workflow skips publishing: merged PR did not contain one of `major`, `minor`, or `patch` labels.
8080
- Workflow fails with multiple release labels: keep exactly one of `major|minor|patch` on the PR.
8181
- Release job says `main` advanced after the PR merged: re-run the `Release` workflow manually after reviewing current `main`.

0 commit comments

Comments
 (0)