-
Notifications
You must be signed in to change notification settings - Fork 147
chore: add provenance and trusted publishers in release workflow #1651
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
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
v1v
left a comment
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.
LGTM, just a couple of changes:
- to keep the least-permissive token access at the job level
- to remove the NPM_TOKEN usage, trusted publishers won't use it
| permissions: | ||
| contents: read | ||
| id-token: write |
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.
Let's keep this as is, we normally follow this pattern:
- default top-level permissions as is
- job permissions with finer-granularity
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.
commit 7c1a80f
.github/workflows/release.yml
Outdated
| DRY_RUN: "${{ inputs.dry-run }}" | ||
| GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} | ||
| run: | | ||
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc |
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.
This should be removed too if we use the trusted publishers
|
@david-luna , If you need help with testing this PR, let me know, I recall I had some test packages to run on my forked repository: so we could try it |
Thanks @v1v :) I think it's fine and we can try with these changes. |
PR to add provenance and trusted publishers to Elastic APM RUM packages. It also adds
--ignore-scriptsnpm CLI option wherever possible.Closes: #1644
Supersedes: #1489