Release workflow customization? #676
-
ContextWe have a hybrid setup, consisting of a monorepo for newer code and a couple of legacy repos consuming packages from that monorepo, published to a private registry. We don't care about changelogs or granular versioning, we just want to be able to use a "point in time" snapshot of the monorepo elsewhere. There are only "major" and "prerelease" versions. Current setupThis is our Lerna config: {
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"npmClient": "yarn",
"version": "123.0.0",
"command": {
"version": {
"exact": true,
"forcePublish": true,
"private": false
}
}
} And we release exclusively through CI, approximately like so: yarn lerna version ${{ inputs.prerelease && 'prerelease' || 'major' }} \
--preid ${{ github.ref_name }} \
--yes
yarn workspaces foreach \
--all \
--no-private \
--verbose \
npm publish \
--tolerate-republish \
--tag ${{ inputs.prerelease && github.ref_name || 'latest' }} This simply bumps all versions of everything, either to ProblemI don't see a way to accomplish this with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is one of the places that oneRepo is pretty opinionated about… which is, "don't do that" – favoring best practices and correctness. I've been part of organizations where we had the type of flow you've got (but using While I completely discourage what you want here… I can see the utility of it and I would be happy to consider a PR that would enable something like… one change version --all --yes Where This already doesn't require change entries, because it will take git commits into account. May also want to consider:
|
Beta Was this translation helpful? Give feedback.
This is one of the places that oneRepo is pretty opinionated about… which is, "don't do that" – favoring best practices and correctness.
I've been part of organizations where we had the type of flow you've got (but using
semantic-release
), and immediately moved away from it because it was too difficult to ensure legacy repos got updated (if ever) when major versions kept happening for every commit. We found that they would often lag and we'd forget what the breaking changes were and eventually end up just ignoring them completely.While I completely discourage what you want here… I can see the utility of it and I would be happy to consider a PR that would enable something like…