Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ci: Fix insufficient permissions for asset validation step (#60625)
Finn Evers9b4598f708ad
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex ec65ab2c872..5a3808e0632 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -760,6 +760,8 @@ jobs:needs:- upload_release_assetsruns-on: namespace-profile-2x4-ubuntu-2404+ permissions:+ contents: writesteps:- name: release::validate_release_assetsrun: |diff --git a/tooling/xtask/src/tasks/workflows/release.rs b/tooling/xtask/src/tasks/workflows/release.rsindex fc3060e375a..ba6bafb933e 100644--- a/tooling/xtask/src/tasks/workflows/release.rs+++ b/tooling/xtask/src/tasks/workflows/release.rs@@ -356,9 +356,14 @@ fn validate_release_assets(deps: &[&NamedJob]) -> NamedJob {};named::job(- dependant_job(deps).runs_on(runners::LINUX_SMALL).add_step(- named::bash(&validation_script).add_env(("GITHUB_TOKEN", vars::GITHUB_TOKEN)),- ),+ dependant_job(deps)+ .runs_on(runners::LINUX_SMALL)+ // The release is still a draft at this point, and draft releases are+ // only visible to tokens with write access to repository contents.+ .permissions(Permissions::default().contents(Level::Write))+ .add_step(+ named::bash(&validation_script).add_env(("GITHUB_TOKEN", vars::GITHUB_TOKEN)),+ ),)}