-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
chore: update publishing scripts #28118
Conversation
Would it be worth adding a "publish-canary" command, to avoid messing it up? Edit: I realise we have one already, but the existing script doesn't seem to match our documented command |
Well, canary usually requires specific |
Yeah, I meqant something like |
That would be handy but I still don't quite understand how to interpolate canary name into both - So with our recommended command for canary: yarn lerna publish --canary --ignore-scripts --exact --preid <preid> --pre-dist-tag <dist_tag> We need to replace both Looks like it requires a separate script or am I missing something? I can revisit this in a follow-up PR unless there is a quick way to do this in yarn scripts. |
Let's skip canary releases nicer CLI command conversation from this PR. This PR should fix the problem of canary release pushing to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks correct after streamlining changelogs ( lerna will generate changelogs since last release tag and NOT since last time it generated changelog, so we shouldn't mix --no-changelog
and publishes with changelogs - it should be consistent )
Rest of things looks good here, but changelogs for sure will need some follow up work (and decisions)
Description
This PR brings all the publishing scripts required for the new release process with additional benefits.
Branch protection
publish-next
andpublish-preminor
are only allowed in themaster
branchpublish-release
andpublish-rc
are only allowed in therelease/*
branchesThis should prevent accidental publishing from a wrong branch (i.e. stable release from master or
next
release from the release branch).Deprecated
yarn run publish
Now it outputs a hint to run
yarn publish-next
oryarn publish-release
.Why? Lerna suggests not to use
publish
script forlerna publish
calls:We also had to use
--ignore-scripts
for--canary
publishing because of this. Now canaries should work with scripts too.Moved pre-publish scripts to lifecycle hooks
scripts/check-publish-access
toprepublishOnly
(as we don't want to run it onpack
)scripts/clear-package-dir
toprepack
(we want to run it for both -pack
andpublish
)