fix(ci): electron-release publish-npm contents:write (#3966)

The v3.8.25→v3.8.26 #3874 fix bumped npm-publish.yml's publish job to contents:write
(gh release upload for the SBOM). electron-release.yml calls that workflow as a reusable
job (publish-npm) but only granted contents:read — a reusable job cannot request more
than the caller grants, so GitHub rejected the v3.8.26 electron run at startup
(startup_failure). Aligns the caller permission to contents:write.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-06-16 02:38:06 -03:00
committed by GitHub
parent 4d21044ba5
commit d59cd14391

View File

@@ -268,7 +268,11 @@ jobs:
name: Publish to npm
needs: [validate, release]
permissions:
contents: read
# Must be `write`, not `read`: this job calls the reusable npm-publish.yml whose
# `publish` job needs `contents: write` (gh release upload — attach the SBOM, #3874).
# A reusable workflow's job cannot request more permission than the caller grants,
# so a `read` here makes GitHub reject the run at startup (startup_failure).
contents: write
id-token: write # npm provenance (forwarded to the reusable workflow)
packages: write # publish to npm.pkg.github.com
uses: ./.github/workflows/npm-publish.yml