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

Add support for publishing with provenance #1152

Open
danez opened this issue May 2, 2023 · 9 comments
Open

Add support for publishing with provenance #1152

danez opened this issue May 2, 2023 · 9 comments

Comments

@danez
Copy link

danez commented May 2, 2023

Affected Packages

cli probably

Problem

npm has introduced provenance https://docs.npmjs.com/generating-provenance-statements
pnpm as of version 8.4 also supports it.

The question it how to implement it to keep supporting older clients. Either it is a config option, or autodetection of the client version and always enable it. Although not sure if it should be always enabled.

@odanado
Copy link
Contributor

odanado commented May 7, 2023

You can support provenance in publishing without changing the @changesets/cli.

As described in Using third-party package publishing tools, simply add "provenance": true to the publishConfig in package.json.

sigstore/sigstore-js supports provenance in this way.
ref: package.json

@uiolee
Copy link
Contributor

uiolee commented Jan 19, 2024

Seconded

@aromko
Copy link

aromko commented Feb 5, 2024

Hello. Can someone confirm that the provenance flag works with adjusting the package.json? I tried it with https://docs.npmjs.com/generating-provenance-statements#example-github-actions-workflow but it leads to permission denied error on the repo.

@mscharley
Copy link

It works for me:

@rygine
Copy link

rygine commented Feb 12, 2024

update: sorted out my issue

the problem was due to using node 18.14.0, which doesn't provide an npm version that supports provenance.

@aromko
Copy link

aromko commented Feb 19, 2024

Hey. The problem still exists in our repo. So we also use node 18.x. Maybe that's the problem. I will try it again if we do a update.

@Andarist
Copy link
Member

I'd like to support this but nobody has provided a PR implementing this that I could review. Unfortunately, my life is currently packed with other things and I just don't feel drawn to Changesets enough to work on it in my free time for free. Don't take me wrong - I love the project. There are just so many hours in a day though and I have to pick up my priorities.

I'd be willing to work on this but the work would have to get sponsored.

@benmccann
Copy link
Contributor

Here's an example PR showing how to do it: sveltejs/kit#12567

One thing that would be nice is if changesets let you set provenance for the whole repo in an easier fashion vs having to set "publishConfig": { "provenance": true } on every individual package

@benmccann
Copy link
Contributor

Actually, it seems there is an easier way to setup this up: sveltejs/kit#12570

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

No branches or pull requests

8 participants