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

Support monorepos with independent versions #51

Merged
merged 131 commits into from
Nov 2, 2022
Merged

Support monorepos with independent versions #51

merged 131 commits into from
Nov 2, 2022

Conversation

rickycodes
Copy link
Contributor

@rickycodes rickycodes commented Aug 25, 2022

This changes functionality to support MetaMask monorepos with an independent versioning strategy.

closes: #45

rickycodes and others added 4 commits October 5, 2022 21:12
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
… into issue-45-updated

* 'issue-45' of github.com:MetaMask/action-publish-release:
  Update .github/workflows/build-lint-test.yml
mcmire
mcmire previously approved these changes Oct 13, 2022
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for hanging in there!

@mcmire
Copy link
Contributor

mcmire commented Oct 14, 2022

I've been testing this out in three cases:

  • Monorepo with fixed versions, using snaps-monorepo
  • Monorepo with independent versions, using controllers (monorepo-poc branch). Note that we are no longer using action-create-release-pr to create release PRs but create-release-branch instead.
  • Polyrepo package

I encountered a problem when attempting to release snaps-monorepo: https://github.com/mcmire/snaps-monorepo/actions/runs/3252758730/jobs/5339319338. But I made changes in 2cc1e0a...7e70bcd to fix this. Here is the successful release: https://github.com/mcmire/snaps-monorepo/actions/runs/3253016948/jobs/5339866555

I also encountered a problem with controllers: https://github.com/mcmire/controllers/actions/runs/3253182761/jobs/5340203034. I made changes here in 7e70bcd...021618a. I was able to get a successful build: https://github.com/mcmire/controllers/actions/runs/3253390324/jobs/5340619148. However, I realized that controllers was not using the latest version of npm-publish (which adds support for independent monorepos). Upon attempting to run create-release-branch again, however, I ran into this bug: MetaMask/create-release-branch#43. We need to fix this before we can continue testing this action.

I haven't gotten around to testing the polyrepo package case yet.

@rickycodes
Copy link
Contributor Author

rickycodes commented Oct 27, 2022

(by pinning to the last commit in this PR 021618a20fd0c0ee89269743d85dc72f92bbc110)

  • I tested the polyrepo release flow in controllers here
  • and similarity tested the fixed monorepo release flow in snaps-monorepo here

everything appears to have worked as expected. both runs skipped the get-release-packages step which is what we want (since these are not an independently versioned monorepo).

so backwards compatibly seems to be good!

@rickycodes
Copy link
Contributor Author

I also tested this on a version of snaps-monorepo where I added release.config.json with an "independent" .versioningStrategy and that appears to have run correctly:

  • It correctly ran the newly added get-release-packages.sh here
  • It correctly determined the RELEASE_STRATEGY as independent here
  • It correctly got a complete list of the packages to be published (in this case all since I did this with Create Release Pull Request) here
  • It correctly created a single version tag and individual tags for each package here

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@rickycodes rickycodes merged commit b0b8a39 into main Nov 2, 2022
@rickycodes rickycodes deleted the issue-45 branch November 2, 2022 22:15
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.

Support monorepos without synchronized versions
3 participants