-
Notifications
You must be signed in to change notification settings - Fork 1
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
Migrate to pnpm, publish via GitHub Actions with provenance #122
Comments
As a note, the "publish package" steps in our processes are becoming a significant pain point |
It took a handful of commits, but my fork now has an automated Actions workflow that publishes a package to npm with provenance (scroll to the bottom of the linked page) and releases to GitHub. It uses changesets and works like so:
Other notes:
Thoughts @andreogle @bbenligiray ? Shall I create a PR? |
I think I like it 👍🏻 My first thought was that having a separate
this is never going to work 😂 changeset sounds good and seems to work well
It seems like we may have crossed the threshold where this is the preferred tool for API3 repos (?) Sounds great to me if so |
I can see a few cases that this doesn't support. For example, if we have a major and a minor change lined up on Is it possible to require a number of approvals on the release PR? @hiletmis can you check the provenance part out? The point is that the releases that do it has a green tick. |
Would provenance also work here? |
@bbenligiray tried on logos. I will do the necessary changes on the other repos as well thanks @dcroote for the feature |
Correct, though I've struggled to think of when we'd have both merged to main but then not want to release the major. Did you have a situation in mind?
As you suggest, I would create a branch (if one didn't already exist), but then add the branch to the workflow trigger here so that changesets releases the appropriate version against that branch containing the patch. The fallback could always be manual release.
Quite possibly. The Airnode docker build steps are a bit complicated, but the api3-dao-dashboard already uses the
I'm not sure this can be done based on GitHub's branch protection rules. The number of reviewer approvals can be set, but only at the branch level. Right now this repo requires: PRs to merge, 1 approval, and status checks before merging. There is the option of "Require review from Code Owners" that might get at what you want.
Sure, and @hiletmis if you want the PRs and commits to have the release version see this step and how it's incorporated. |
It's common to bundle breaking changes together to reduce the number of major releases. Breaking changes also typically take a longer time to implement. Of multiple breaking changes, one will hit main first, and in the case that we want to bundle all breaking changes together, we would have to wait until all breaking changes are completed before being able to make a new release, which would potentially take a long time. Again though, I'm thinking generally, OIS may not be affected by this in practice.
We probably wouldn't need manual release at all in this case. This may be overkill for something like OIS that historically had a linear release path (no backporting) though.
Documented in api3dao/airnode#1956
It looks like we can require an arbitrary number of approvals or approval of code owners, but this may be annoying on main. Having a special release branch (or multiple for different versions) would allow stricter requirements to be practical. |
OK- after a bunch of exploration the following can work, which I believe satisfies everything. Note it is slightly more laborious because of the multiple PRs, but I think that is inescapable if we want stricter release protections.
What is nice is while the release process is occurring, development can continue on Note that I believe merging of PRs to and from |
Sounds simple enough to me. |
Sounds good, this is mostly what we're doing atm with the data feed operations (except the release branch isn't protected yet)
I assume you opened this PR manually. I wonder if it can be opened automatically after the release. |
Indeed it can be, good thought. |
@hiletmis see above. We tend to merge |
Adding following to the release workflow should do the job;
|
A nice to have, see the discussion as well as the blog post on npm package provenance.
The text was updated successfully, but these errors were encountered: