Skip to content

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

Merged
diegosouzapw merged 2 commits into
mainfrom
fix/release-v3.8.50-electron-lockfile-build-ref
Aug 29, 2026
Merged

fix(release): resync the electron lockfile and let a dispatch build from a repaired ref#11982
diegosouzapw merged 2 commits into
mainfrom
fix/release-v3.8.50-electron-lockfile-build-ref

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Achado (redisparo do Electron para v3.8.50, run 33238093090)

Leg Linux morreu em npm ci dentro de electron/:

Missing: electron-builder-squirrel-windows@26.15.3 from lock file (+ 12 transitivos: electron-winstaller, @electron/windows-sign, …)

A subárvore opcional do instalador Windows do electron-builder tinha sido perdida na última regeneração do lock — e nenhum CI rodou os legs do desktop desde então (v3.8.49 nunca rodou; v3.8.50 morreu na inicialização, #11973). A tag v3.8.50 carrega o lock quebrado.

O que muda

  • electron/package-lock.json: npm install --package-lock-only devolve as 13 entradas (271 → 284). Prova: npm ci --ignore-scripts numa cópia limpa: exit 0, 284 pacotes.
  • electron-release.yml: input build_ref (default = a tag da versão) para o dispatch buildar a partir de uma linha reparada quando a própria tag não builda. Push de tag não muda.

Validação

actionlint limpo; electron-release-desktop-channel-8949 4/4, electron-release-efficiency 3/3, electron-release-latest-yml.repro 2/2, check-workflows 32/32.

Depois do merge

gh workflow run electron-release.yml --ref main -f version=v3.8.50 -f build_ref=main -f publish_npm=false (com ELECTRON_SHARED_STANDALONE=disabled ligado por #11979) → os 4 legs anexam os assets à release existente.

…rom 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.
`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.
@github-actions

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: cancelled
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw
diegosouzapw merged commit 2af28c4 into main Aug 29, 2026
87 of 92 checks passed
@diegosouzapw
diegosouzapw deleted the fix/release-v3.8.50-electron-lockfile-build-ref branch August 29, 2026 12:05
diegosouzapw added a commit that referenced this pull request Aug 29, 2026
…SBOM on dispatch (twin of #11982 + #12020) (#12022)

* fix(release): resync the electron lockfile, build a dispatch from a repaired ref, keep curated notes, attach the SBOM on dispatch (release/v3.8.51 twin of #11982 + #12020)

Same four changes as #11982 and #12020 on main, applied to this branch's own copies:

- electron/package-lock.json regenerated (271 -> 284 entries): the optional
  electron-builder-squirrel-windows subtree was missing and `npm ci` refused the lock
  (EUSAGE) on the Linux and macOS legs; a clean `npm ci --ignore-scripts` on the
  result exits 0.
- electron-release.yml: `build_ref` dispatch input (default: the version tag) and
  `generate_release_notes` only on the tag push (a re-attach dispatch appended
  GitHub's auto notes to the curated body on v3.8.50).
- npm-publish.yml: the SBOM attaches to the GitHub Release on workflow_dispatch
  publishes too, whenever a release for the tag exists.

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

* fix(release): validate build_ref in the validate job before any checkout uses it

CodeQL (actions/cache-poisoning/poisonable-step, high) on release/v3.8.51 — the
default branch: a raw dispatch input checked out next to setup-node's npm cache is a
cache-poisoning vector. The input now goes through the validate job's regex
allowlist (main or release/vX.Y.Z, empty = the version tag) and every build job
checks out needs.validate.outputs.build_ref, never the input itself.

* fix(release): drop the build_ref input — a dispatch builds the ref it is dispatched on

CodeQL (actions/cache-poisoning/poisonable-step) tracks the input through the
validate job's output regardless of the regex allowlist: an input-controlled
checkout next to setup-node's npm cache on the default branch is a cache-poisoning
vector. The ref is not an input any more; the checkouts use github.ref, so
`gh workflow run electron-release.yml --ref v3.8.50 -f version=v3.8.50` rebuilds
the tag and `--ref main` builds the repaired line. The tag-push path is unchanged.
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.

1 participant