Skip to content

Commit ad60c83

Browse files
authored
chore: migrate to OIDC publishing for npm releases (#569)
- Add OIDC trusted publishing support - Remove npm token and github-token dependencies - Add production environment and required permissions - Update to publish-mode: oidc This migration eliminates the need for npm tokens and provides enhanced security through GitHub's identity provider.
1 parent 4699c54 commit ad60c83

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,17 @@ on:
1616

1717
jobs:
1818
release:
19+
runs-on: ubuntu-latest
20+
environment: production
1921
permissions:
2022
contents: write
2123
issues: write
2224
pull-requests: write
2325
id-token: write
24-
runs-on: ubuntu-latest
2526
steps:
2627
- uses: nearform-actions/optic-release-automation-action@v4
2728
with:
28-
github-token: ${{ secrets.github_token }}
29-
npm-token: >-
30-
${{ secrets[format('NPM_TOKEN_{0}', github.actor)] ||
31-
secrets.NPM_TOKEN }}
32-
optic-token: >-
33-
${{ secrets[format('OPTIC_TOKEN_{0}', github.actor)] ||
34-
secrets.OPTIC_TOKEN }}
35-
ngrok-token: ${{ secrets.NGROK_TOKEN }}
29+
publish-mode: oidc
3630
semver: ${{ github.event.inputs.semver }}
3731
build-command: |
3832
npm install
39-
provenance: true

0 commit comments

Comments
 (0)