From d43250e5b809c4879dabe3166a6c5afb6e722cb3 Mon Sep 17 00:00:00 2001 From: Marc Bouchenoire Date: Thu, 30 Jul 2026 10:06:01 +0200 Subject: [PATCH 1/2] Allow releasing DevTools without a changelog entry (#3628) --- .github/scripts/release.sh | 19 ++++++++++++++----- .github/workflows/publish-packages.yml | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/scripts/release.sh b/.github/scripts/release.sh index 9ad34d14ecc..e0377242be8 100755 --- a/.github/scripts/release.sh +++ b/.github/scripts/release.sh @@ -8,7 +8,7 @@ err () { } usage () { - err "usage: release.sh [-h] [-V ] [-p] [-m ] [-f] [-w] [...]" + err "usage: release.sh [-h] [-V ] [-p] [-m ] [-f] [-w] [-c] [...]" err err "Prepare a release by updating files in this repo." err "Run this prior to publishing to NPM (or elsewhere, e.g. DevTools)." @@ -18,6 +18,7 @@ usage () { err " -m improve the commit message by specifying what was bumped" err " -f force version update (use --force flag with npm version)" err " -w disable workspace updates (use --workspaces-update false with npm version)" + err " -c check and update CHANGELOG.md" err "" } @@ -26,13 +27,15 @@ PUSH_COMMIT="false" COMMIT_MESSAGE="Bump to " FORCE_FLAG="" WORKSPACES_UPDATE_FLAG="" -while getopts V:p:m:fwh flag; do +UPDATE_CHANGELOG="false" +while getopts V:p:m:fwch flag; do case "$flag" in V) VERSION=$OPTARG;; p) PUSH_COMMIT="true";; m) COMMIT_MESSAGE=$OPTARG;; f) FORCE_FLAG="--force";; w) WORKSPACES_UPDATE_FLAG="--workspaces-update false";; + c) UPDATE_CHANGELOG="true";; *) usage; exit 2;; esac done @@ -177,7 +180,9 @@ inject_changelog_heading () { check_is_valid_version "$VERSION" # Fail fast if a heading is due for this release but vNEXT has no entries -assert_changelog_ready "$ROOT/CHANGELOG.md" +if [ "$UPDATE_CHANGELOG" = "true" ]; then + assert_changelog_ready "$ROOT/CHANGELOG.md" +fi # Run a fresh install to ensure the lock file isn't outdated before continuing pnpm install --no-frozen-lockfile @@ -191,6 +196,10 @@ done pnpm install --no-frozen-lockfile # Add a CHANGELOG heading for this release if one doesn't exist yet -inject_changelog_heading "$ROOT/CHANGELOG.md" +FILES_TO_COMMIT=("pnpm-lock.yaml" "packages/" "tools/") +if [ "$UPDATE_CHANGELOG" = "true" ]; then + inject_changelog_heading "$ROOT/CHANGELOG.md" + FILES_TO_COMMIT+=("CHANGELOG.md") +fi -commit_to_git "${COMMIT_MESSAGE}${VERSION}" "pnpm-lock.yaml" "packages/" "tools/" "CHANGELOG.md" +commit_to_git "${COMMIT_MESSAGE}${VERSION}" "${FILES_TO_COMMIT[@]}" diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index d3dd7f8e8c8..958bb67ae86 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -86,7 +86,7 @@ jobs: VERSION: ${{steps.version.outputs.value}} run: - ./.github/scripts/release.sh -V "$VERSION" -w + ./.github/scripts/release.sh -V "$VERSION" -w -c "packages/liveblocks-core" "packages/liveblocks-client" "packages/liveblocks-node" "packages/liveblocks-chat-sdk-adapter" "packages/liveblocks-react" From 568400b07046db1639a2ba0a5f4ba9da2d15460b Mon Sep 17 00:00:00 2001 From: Marc Bouchenoire Date: Thu, 30 Jul 2026 12:04:09 +0200 Subject: [PATCH 2/2] Fix release script flag parsing (#3631) --- .github/scripts/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/release.sh b/.github/scripts/release.sh index e0377242be8..f32909f3944 100755 --- a/.github/scripts/release.sh +++ b/.github/scripts/release.sh @@ -28,7 +28,7 @@ COMMIT_MESSAGE="Bump to " FORCE_FLAG="" WORKSPACES_UPDATE_FLAG="" UPDATE_CHANGELOG="false" -while getopts V:p:m:fwch flag; do +while getopts V:pm:fwch flag; do case "$flag" in V) VERSION=$OPTARG;; p) PUSH_COMMIT="true";;