Skip to content

Commit 8569ec1

Browse files
authored
feat(gh): enable Trusted Publisher authentication for NPM publishing (#521)
* chore(gh): remove disabled workflow * feat(gh): update workflow to use OIDC
1 parent 4e10856 commit 8569ec1

2 files changed

Lines changed: 4 additions & 99 deletions

File tree

.github/workflows/manual-release.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,12 @@ jobs:
133133
--targets=linux-x64,win32-x64,darwin-arm64 \
134134
--ignore-missing
135135
136+
136137
npm-publish:
137138
runs-on: ubuntu-latest
138139
needs: [check-version, test, upload-assets]
139140
permissions:
140-
id-token: write
141+
id-token: write # Required for OIDC
141142
steps:
142143
- uses: actions/checkout@v6
143144
- uses: actions/setup-node@v6
@@ -151,15 +152,11 @@ jobs:
151152

152153
# Dry run NPM publish
153154
- name: Dry run NPM publish
154-
run: npm publish --tag ${{ needs.check-version.outputs.oclif_channel }} --provenance --access public --dry-run
155-
env:
156-
NODE_AUTH_TOKEN: ${{ secrets.HD_CLI_NPM_TOKEN }}
155+
run: npm publish --tag ${{ needs.check-version.outputs.oclif_channel }} --access public --dry-run # --provenance no longer needed as OIDC uses that by default
157156

158157
# NPM Release
159158
- name: Create NPM release
160-
run: npm publish --tag ${{ needs.check-version.outputs.oclif_channel }} --provenance --access public
161-
env:
162-
NODE_AUTH_TOKEN: ${{ secrets.HD_CLI_NPM_TOKEN }}
159+
run: npm publish --tag ${{ needs.check-version.outputs.oclif_channel }} --access public # --provenance no longer needed as OIDC uses that by default
163160

164161
publish-images:
165162
name: Publish Images

.github/workflows/release.yml

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)