fix(ci): release v4.x from the dispatched branch instead of a branch input - #1676
Merged
Conversation
A reusable workflow's job definition (including the node-version test matrix) is read from the same git ref as the caller, not from the checked-out code. A 'branch' input could only change which code was tested, never which matrix ran. Releasing v4.x from master would test against master's node versions and miss v4.x-supported versions. Drive the release off github.ref_name so v4.x's own shared-ci matrix (18.x/20.x/22.x/24.x/latest) governs its release. Remove the misleading 'branch' input. Publish now checks out by branch name so it includes the version-bump commit pushed by the version job (previously it checked out the pre-bump triggering SHA). To release v4.x, dispatch the Release workflow from the v4.x branch.
There was a problem hiding this comment.
Pull request overview
Updates the production release workflow to operate on the same Git ref that triggered the workflow_dispatch, ensuring the release pipeline (including the reusable CI workflow) runs with the correct branch-specific configuration (e.g., Node test matrix).
Changes:
- Remove the manual
branchworkflow input and derive the release branch fromgithub.ref_name. - Ensure the publish job checks out the dispatched branch ref (so it includes the version-bump commit pushed by the
versionjob). - Add inline workflow comments clarifying why the dispatched ref must be used.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 2 commits
July 21, 2026 14:07
lerna version pushes to the branch head, so releasing from a tag or detached commit fails. Fail fast with a clear message instead.
kessplas
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
Remove the
branchinput from workflows.Before, the src/test code from
branchwould be checked out, but NOT the test environments configured onbranch. This led to a weird case where I was trying to release frombranch=v4.xfrom the master branch. ESDK JS 4.x supports node <22 but 5.x doesn't; master doesn't test against <22 since it's a 5.x branch.Now, release always runs from the branch configured in the release workflow run. (This is also simpler, Kess and I were confused by this distinction earlier)
(Should also note that the "must release from a branch" (versus releasing from a specific commit) requirement was implicit, but is now explicit. In the release workflow the CI bot pushes a changelog commit, which would fail if it checked out a commit rather than a branch.)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Check any applicable: