Skip to content

Commit 978ef31

Browse files
fix(release): let host smoke jobs read the draft release lock
Draft releases are visible only to tokens with push access, so the supported-host smoke jobs' contents: read token could not download the still-draft release lock via prepare-release-lock.ts, failing every release before publication. Grant contents: write, matching the publish-release job's existing draft-asset download, and pin the permission in the deployment policy test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 3ffa33b commit 978ef31

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,9 @@ jobs:
447447
runs-on: ${{ matrix.runner }}
448448
timeout-minutes: 20
449449
permissions:
450-
contents: read
450+
# The release is still a draft here, and draft releases are visible only to tokens with push
451+
# access, so `gh release download` in prepare-release-lock.ts needs contents: write.
452+
contents: write
451453
packages: read
452454
steps:
453455
- name: Check out the released tree

scripts/release-deployment-policy.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,8 @@ await test("release publication requires native smoke tests for every supported
5252
assert.match(smokeGate, /architecture: arm64\n\s+runner: ubuntu-24\.04-arm/);
5353
assert.match(smokeGate, /up -d --wait --wait-timeout 600/);
5454
assert.match(smokeGate, /prepare-release-lock\.ts/);
55+
// Draft releases are visible only to tokens with push access; a read-only token cannot
56+
// download the still-draft release lock and would fail every smoke run.
57+
assert.match(smokeGate, /contents: write/);
5558
assert.match(release, /gh release upload "\$TAG_NAME" host-smoke\/\*\.json/);
5659
});

0 commit comments

Comments
 (0)