Skip to content

Commit f885406

Browse files
authored
chore: migrate to OIDC publishing for npm releases (#215)
- Add OIDC trusted publishing support - Remove npm token and optic-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 95e1cf0 commit f885406

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
jobs:
1818
release:
1919
runs-on: ubuntu-latest
20+
environment: production
2021
permissions:
2122
contents: write
2223
issues: write
@@ -25,13 +26,7 @@ jobs:
2526
steps:
2627
- uses: nearform-actions/optic-release-automation-action@v4
2728
with:
28-
npm-token: >-
29-
${{ secrets[format('NPM_TOKEN_{0}', github.actor)] ||
30-
secrets.NPM_TOKEN }}
31-
optic-token: >-
32-
${{ secrets[format('OPTIC_TOKEN_{0}', github.actor)] ||
33-
secrets.OPTIC_TOKEN }}
29+
publish-mode: oidc
3430
semver: ${{ github.event.inputs.semver }}
3531
commit-message: 'chore: release {version}'
3632
build-command: npm ci
37-
provenance: true

0 commit comments

Comments
 (0)