-
-
Notifications
You must be signed in to change notification settings - Fork 1
ci: migrate npm publishing to OIDC trusted publishing #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,7 @@ on: | |||||||
| workflow_call: | ||||||||
| secrets: | ||||||||
| NPM_TOKEN: | ||||||||
| required: true | ||||||||
| required: false | ||||||||
| SLACK_WEBHOOK_URL: | ||||||||
| required: true | ||||||||
|
|
||||||||
|
|
@@ -47,7 +47,7 @@ jobs: | |||||||
| with: | ||||||||
| name: publish-release-artifacts-${{ github.sha }} | ||||||||
| - name: Dry Run Publish | ||||||||
| uses: MetaMask/action-npm-publish@v5 | ||||||||
| uses: MetaMask/action-npm-publish@18df42148c35aabb98e00f9fda127d421af141df # v6 | ||||||||
| with: | ||||||||
| slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| subteam: S042S7RE4AE | ||||||||
|
|
@@ -58,6 +58,9 @@ jobs: | |||||||
| needs: publish-npm-dry-run | ||||||||
| runs-on: ubuntu-latest | ||||||||
| environment: npm-publish | ||||||||
| permissions: | ||||||||
| contents: read | ||||||||
| id-token: write | ||||||||
| steps: | ||||||||
| - name: Checkout and setup environment | ||||||||
| uses: MetaMask/action-checkout-and-setup@v2 | ||||||||
|
|
@@ -69,8 +72,12 @@ jobs: | |||||||
| with: | ||||||||
| name: publish-release-artifacts-${{ github.sha }} | ||||||||
| - name: Publish | ||||||||
| uses: MetaMask/action-npm-publish@v5 | ||||||||
| uses: MetaMask/action-npm-publish@18df42148c35aabb98e00f9fda127d421af141df # v6 | ||||||||
| with: | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We added a
Suggested change
|
||||||||
| # This `NPM_TOKEN` is only needed to publish a package for the first | ||||||||
| # time. Look in the repository settings under "Environments", and set | ||||||||
| # this token in the `npm-publish` environment, then delete it after | ||||||||
| # the initial OIDC publish. | ||||||||
| npm-token: ${{ secrets.NPM_TOKEN }} | ||||||||
| env: | ||||||||
| SKIP_PREPACK: true | ||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -105,7 +105,7 @@ | |||||
| "@playwright/test": "^1.49.0", | ||||||
| "playwright": "^1.49.0" | ||||||
| }, | ||||||
| "packageManager": "yarn@4.11.0", | ||||||
| "packageManager": "yarn@4.16.0", | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a strict requirement but we recommend pinning this to a checksum:
Suggested change
|
||||||
| "engines": { | ||||||
| "node": "^20 || ^22 || >=24" | ||||||
| }, | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pin these. You can add a Zizmor config like the one in the module-template to remove these errors.