MetaMask / action-publish-release

MIT License
12 stars 6 forks source link

Support monorepos with independent versions #51

Closed rickycodes closed 1 year ago

rickycodes commented 2 years ago

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

closes: #45

mcmire commented 1 year ago

I've been testing this out in three cases:

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: https://github.com/MetaMask/create-release-branch/issues/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 commented 1 year ago

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

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 commented 1 year ago

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: