Skip to content

Commit a60f3a8

Browse files
committed
fix(uniffi): drop unneeded contents:write permission on workflow jobs
The CodeQL autofix landed in #1078 added `permissions: contents: read` at the top level of uniffi-packages.yml, which then forbids any nested job (including the called workflow uniffi-swift.yml) from requesting higher permissions — workflow validation fails with: Error calling workflow ... The nested job 'build-and-publish' is requesting 'contents: write', but is only allowed 'contents: read'. Neither job actually needs write: `gh release list` in resolve-tag is read-only, and the publish step authenticates to the hosting repo with UNIFFI_XCFRAMEWORK_PAT (not GITHUB_TOKEN). Drop the elevation on both so the workflow can start.
1 parent 186a122 commit a60f3a8

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

.github/workflows/uniffi-packages.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ env:
3232
jobs:
3333
resolve-tag:
3434
runs-on: ubuntu-latest
35-
permissions:
36-
contents: write
3735
outputs:
3836
tag_name: ${{ steps.get-tag.outputs.tag_name }}
3937
version: ${{ steps.get-tag.outputs.version }}

.github/workflows/uniffi-swift.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
name: Build & publish Swift xcframework
3939
runs-on: macos-26
4040
permissions:
41-
contents: write
41+
contents: read
4242
steps:
4343
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4444
with:

0 commit comments

Comments
 (0)