ExodusMovement / lerna-release-action

Selectively release packages from a lerna monorepo
0 stars 0 forks source link

feat: add `--local` flag to allow versioning locally #24

Closed sparten11740 closed 1 year ago

sparten11740 commented 1 year ago

We've been hitting rate limits in GH recently preventing the version workflow from doing its job.

This PR adds a --local flag to the release CLI which can be used to run the version workflow locally. It makes sure that the current working directory is clean and up-to-date with master before proceeding. As before, it still creates a release PR that has to be signed off.

The GH user has to be configured as local git user, otherwise assigning the PR will not work (f.i. git config user.name sparten11740)

https://github.com/ExodusMovement/lerna-release-action/assets/2863630/02acfe50-e0a3-4689-bc06-1537798e430e

Testplan

The CLI version from this PR is published as v1.2.0 and added to the test repo

  1. Pull in the latest changes in the test repo
  2. yarn install
  3. Call yarn release --local batcave
  4. Verify the command creates a release PR

Regressions

  1. Versioning still works in the CI using the workflow from this branch (✅ tested with https://github.com/ExodusMovement/lerna-version-selectively/pull/353)
sparten11740 commented 1 year ago

Thanks Simon. I relied on prepublishOnly building for me, but apparently it didn't. Switched to prepack in https://github.com/ExodusMovement/lerna-release-action/pull/24/commits/5722cb6bc4a3c6a3f8bb59beeb4cf76f09646de8 and released a new version. Also verified that the package contains the changes this time.