Skip to content

fix(ci): release v4.x from the dispatched branch instead of a branch input - #1676

Merged
lucasmcdonald3 merged 3 commits into
v4.xfrom
release-from-dispatch-branch-v4.x
Jul 22, 2026
Merged

fix(ci): release v4.x from the dispatched branch instead of a branch input#1676
lucasmcdonald3 merged 3 commits into
v4.xfrom
release-from-dispatch-branch-v4.x

Conversation

@lucasmcdonald3

@lucasmcdonald3 lucasmcdonald3 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

Remove the branch input from workflows.

Before, the src/test code from branch would be checked out, but NOT the test environments configured on branch. This led to a weird case where I was trying to release from branch=v4.x from 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:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 branch workflow input and derive the release branch from github.ref_name.
  • Ensure the publish job checks out the dispatched branch ref (so it includes the version-bump commit pushed by the version job).
  • 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.

Lucas McDonald 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.
@lucasmcdonald3
lucasmcdonald3 merged commit ffa6895 into v4.x Jul 22, 2026
34 checks passed
@lucasmcdonald3
lucasmcdonald3 deleted the release-from-dispatch-branch-v4.x branch July 22, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants