Skip to content

fix(ci): grant the tag workflow's release job the permissions release.yml declares - #13

Open
TeddyHarnat wants to merge 1 commit into
SpencerC:mainfrom
TeddyHarnat:fix/tag-workflow-permissions
Open

fix(ci): grant the tag workflow's release job the permissions release.yml declares#13
TeddyHarnat wants to merge 1 commit into
SpencerC:mainfrom
TeddyHarnat:fix/tag-workflow-permissions

Conversation

@TeddyHarnat

Copy link
Copy Markdown
Collaborator

What & why

The "Tag a Release" workflow_dispatch has never worked: run 33897671351 (its first-ever dispatch) died in 4s with startup_failure — no jobs, no logs. The cause is GitHub's reusable-workflow permissions cap: a workflow called via workflow_call cannot exceed its caller job's permissions grant. tag.yaml's release job granted only contents: write, while release.yml declares id-token: write and attestations: write for provenance attestation, so the dispatch fails validation at startup.

This never surfaced before because v0.3.0 was cut through the documented fallback — pushing the tag by hand — which triggers release.yml directly under its own top-level permissions.

Fix: grant the release job in tag.yaml the same three permissions release.yml declares, with a comment explaining the subset rule so the next permission added to release.yml gets mirrored.

Checklist

  • bazel test //flutter/tests:all_tests //docs:update_tests passes — not run: CI-workflow-only change, no Bazel targets affected
  • cd e2e/smoke && bazel test //:integration_tests passes (if behavior changed) — no build behavior change
  • Ran bazel run //docs:update if any rule/macro API changed — no API change
  • pre-commit run --all-files (buildifier + prettier) — actionlint passes on the edited workflow; no Starlark touched
  • Updated docs/README for user-facing changes — comment added at the fix site

….yml declares

A workflow called via workflow_call cannot exceed its caller job's
permissions grant. tag.yaml's release job granted only contents: write,
while release.yml declares id-token: write and attestations: write for
provenance attestation, so every workflow_dispatch of 'Tag a Release'
failed at startup with no jobs or logs. The manual tag-push path was
unaffected because it triggers release.yml directly with its own
permissions, which is why v0.3.0 released fine by hand.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants