Skip to content
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

feat: add npm package provenance #135

Merged
merged 2 commits into from
Nov 22, 2023
Merged

feat: add npm package provenance #135

merged 2 commits into from
Nov 22, 2023

Conversation

olizilla
Copy link
Contributor

a verifiable way to link a package back to its source repository and the specific build instructions used to publish it.

  • publish to npm with provenance flag
  • update checkout and setup-node actions to v4

see: https://github.blog/2023-04-19-introducing-npm-package-provenance/

License: MIT

> a verifiable way to link a package back to its source repository and the specific build instructions used to publish it.

- publish to npm with provenance flag
- update checkout and setup-node actions to v4

see: https://github.blog/2023-04-19-introducing-npm-package-provenance/

License: MIT
Signed-off-by: Oli Evans <oli@protocol.ai>
we test as part of the releae step

License: MIT
Signed-off-by: Oli Evans <oli@protocol.ai>
@olizilla olizilla merged commit 9b1697c into main Nov 22, 2023
1 check passed
@olizilla olizilla deleted the npm-provenance branch November 22, 2023 15:45
olizilla pushed a commit that referenced this pull request Nov 22, 2023
🤖 I have created a release *beep* *boop*
---


##
[6.1.0](v6.0.0...v6.1.0)
(2023-11-22)


### Features

* add npm package provenance
([#135](#135))
([9b1697c](9b1697c))


### Bug Fixes

* update deps. pull in w3up-client fixes
([#133](#133))
([6aacec8](6aacec8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Comment on lines +9 to +12
permissions:
id-token: write
contents: write
pull-requests: write
Copy link

@achingbrain achingbrain Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just looking at doing similar things elsewhere. Why were the contents and pull-requests write perms granted? The npm docs say only id-token is needed.

Though even their example also has read perms for contents so IDK 🤷‍♂️.

Copy link

@achingbrain achingbrain Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this useful after debugging a couple of failures in the js-libp2p repo - https://docs.github.com/en/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28

Basically only id-token and contents need write perms.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To answer my own question it looks like contents is needed to create releases and pull-requests is to create the release PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the one. When I added the id token permission release-please started failing until i added the other perms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants