fix(release): resync the electron lockfile and let a dispatch build from a repaired ref (#11982)

* fix(release): resync the electron lockfile and let a dispatch build from a repaired ref

The v3.8.50 desktop re-dispatch (run 33238093090) lost its Linux leg at
`npm ci` in electron/: "Missing: electron-builder-squirrel-windows@26.15.3 from
lock file" plus its 12 transitive entries — the optional Windows-installer subtree of
electron-builder had been dropped when the lock was last regenerated, and no CI ran
the desktop legs between then and the tag (v3.8.49 never ran them; v3.8.50 died at
startup, #11973). `npm install --package-lock-only` restores the 13 entries; a clean
`npm ci --ignore-scripts` on the result adds 284 packages with no complaint.

The tag itself carries the broken lock, and the workflow now checks out the tag on
dispatch (#11973), so a dispatch input `build_ref` (default: the version tag) lets the
operator name the repaired line — the v3.8.50 assets will be rebuilt from main, which
is 3.8.50 plus its post-release fixes. Push-triggered runs are unaffected.

actionlint clean; electron-release-desktop-channel-8949, electron-release-efficiency,
electron-release-latest-yml.repro and check-workflows suites pass.

* fix(release): do not regenerate release notes on a re-attach dispatch

`generate_release_notes: true` on an existing release APPENDS GitHub's auto-generated
"What's Changed" block to the curated body — the v3.8.50 re-dispatch (run 33238093090)
added 1,416 chars to the 121 KB notes. Only the tag push should generate notes.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-08-29 09:05:34 -03:00
committed by GitHub
parent 6f1f1668dd
commit 2af28c4e2c
3 changed files with 208 additions and 4 deletions

View File

@@ -15,6 +15,11 @@ on:
required: false
default: true
type: boolean
build_ref:
description: "Git ref to BUILD from (default: the version tag). Set to a branch when the tag itself cannot build — e.g. a lockfile that was already broken when it was cut — and the assets must come from the repaired line"
required: false
default: ""
type: string
# Least-privilege default: read-only at the top level; each job grants the writes it
# needs (build/release upload assets, publish-npm forwards npm provenance / packages
@@ -83,7 +88,7 @@ jobs:
persist-credentials: false
# workflow_dispatch: build the tag being (re)built, not the dispatching branch. On a
# tag push this resolves to the same commit.
ref: ${{ needs.validate.outputs.version }}
ref: ${{ inputs.build_ref || needs.validate.outputs.version }}
- name: Setup Node
uses: actions/setup-node@v7
with:
@@ -171,7 +176,7 @@ jobs:
persist-credentials: false
# workflow_dispatch: build the tag being (re)built, not the dispatching branch. On a
# tag push this resolves to the same commit.
ref: ${{ needs.validate.outputs.version }}
ref: ${{ inputs.build_ref || needs.validate.outputs.version }}
- name: Setup Node
uses: actions/setup-node@v7
with:
@@ -359,7 +364,7 @@ jobs:
persist-credentials: false
fetch-depth: 0
# Source archives + SBOM come from the tag being released, not the dispatching branch.
ref: ${{ needs.validate.outputs.version }}
ref: ${{ inputs.build_ref || needs.validate.outputs.version }}
# `merge-multiple` is deliberately OFF. It resolves same-name collisions by ARRIVAL
# ORDER, and the two macOS jobs each emit their own `latest-mac.yml` listing only their
@@ -417,7 +422,10 @@ jobs:
tag_name: ${{ needs.validate.outputs.version }}
draft: false
prerelease: false
generate_release_notes: true
# Only on the tag push. A re-attach dispatch runs against a release whose curated
# notes already exist, and `true` APPENDS GitHub's auto-generated "What's Changed"
# block to them (v3.8.50, run 33238093090: +1,416 chars on a 121 KB body).
generate_release_notes: ${{ github.event_name != 'workflow_dispatch' }}
fail_on_unmatched_files: false
files: |
release-assets/*.dmg