Skip to content

Commit ac43611

Browse files
committed
chore(release): switch to npm trusted publishing
1 parent 000e4e1 commit ac43611

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ on:
66
- "v*"
77

88
permissions:
9-
contents: write
9+
contents: read
1010
id-token: write
1111

1212
jobs:
1313
publish:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/setup-node@v4
16+
- uses: actions/checkout@v6
17+
- uses: actions/setup-node@v6
1818
with:
19-
node-version: 22
19+
node-version: 24
2020
registry-url: https://registry.npmjs.org
2121
cache: npm
2222
- run: npm ci
@@ -44,9 +44,7 @@ jobs:
4444
echo "Tag version ${{ steps.meta.outputs.version }} does not match package.json version $package_version" >&2
4545
exit 1
4646
fi
47-
- run: npm publish --access public --tag "${{ steps.meta.outputs.dist_tag }}" --provenance
48-
env:
49-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
- run: npm publish --access public --tag "${{ steps.meta.outputs.dist_tag }}"
5048
- uses: softprops/action-gh-release@v2
5149
with:
5250
generate_release_notes: true

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,19 @@ The repository includes GitHub Actions templates for CI and npm publishing from
6363

6464
## GitHub Actions setup
6565

66-
Set this repository secret for automated npm publishing:
66+
Configure npm Trusted Publishing for this package:
6767

68-
- `NPM_TOKEN`
68+
1. Open the `opencode-planner` package settings on npm.
69+
2. Add a GitHub Actions trusted publisher.
70+
3. Use:
71+
- GitHub user/org: `timrichardson`
72+
- Repository: `opencode-planner`
73+
- Workflow filename: `release.yml`
6974

7075
The release workflow publishes prerelease tags like `v0.1.1-beta.1` to the npm `beta` dist-tag, stable tags like `v0.1.1` to `latest`, and creates matching GitHub release notes automatically.
7176

77+
Trusted Publishing uses GitHub OIDC and does not require an `NPM_TOKEN` secret for publishing.
78+
7279
## License
7380

7481
MIT

0 commit comments

Comments
 (0)