Skip to content

ci(unity): grant contents:write so unity-nuget-test can see draft releases#6081

Merged
Fedr merged 1 commit into
masterfrom
ci/unity-nuget-test-contents-write
May 9, 2026
Merged

ci(unity): grant contents:write so unity-nuget-test can see draft releases#6081
Fedr merged 1 commit into
masterfrom
ci/unity-nuget-test-contents-write

Conversation

@Fedr
Copy link
Copy Markdown
Contributor

@Fedr Fedr commented May 9, 2026

Summary

PR #6073 swapped BUILD_MACHINE_TOKEN for github.token across CI workflows but left unity-nuget-test.yml declaring contents: read at the workflow level. The .nupkg lives on a draft release, and GitHub's REST API only lists draft releases for callers with push (write) access — so the read-only GITHUB_TOKEN now gets release not found against the draft, and gh release download fails.

Concrete failure: run 25607068360 / unity-nuget-test

gh release download v3.1.2.213 --pattern "*.nupkg" --repo MeshInspector/MeshLib --clobber
release not found

The job's GITHUB_TOKEN Permissions block in the log shows Contents: read / Metadata: read, which matches the workflow-level declaration.

This PR bumps the workflow permission to contents: write to match the other reusable workflows updated in #6073 (build-test-distribute.yml, distro-release.yml, release-body-update.yml, versioning-release.yml).

Test plan

  • Next scheduled Build Test Distribute run on master succeeds at the windows-unity-test / unity-nuget-test job, or
  • Manual workflow_dispatch of unity-nuget-test.yml with an existing draft release_tag succeeds at the Download nuget package step

… releases

PR #6073 swapped BUILD_MACHINE_TOKEN for github.token in the unity nuget
test, but unity-nuget-test.yml still declared contents:read at the
workflow level. The .nupkg lives on a draft release, and GitHub only
lists draft releases for callers with push (write) access — so
`gh release download <tag>` now returns "release not found" against the
draft, breaking the scheduled run.

Bump the workflow permission to contents:write to match the other
workflows updated in #6073.
@Fedr Fedr merged commit 4c52126 into master May 9, 2026
23 checks passed
@Fedr Fedr deleted the ci/unity-nuget-test-contents-write branch May 9, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant