Skip to content

Commit 1fc6cd1

Browse files
committed
CI: grant release job explicit contents:write permission
The 0.1.0 tag push triggered the Windows release workflow but it failed at the "Upload release artifacts" step with: HTTP 403: Resource not accessible by integration (https://api.github.com/repos/iliaal/mdparser/releases) Two fixes: 1. Bumped the repo-level default workflow permission from `read` to `write` (matches iliaal/php_excel's setting). New GitHub repos default to `read`, which blocks release creation. 2. Added an explicit `permissions: contents: write` block on the `release` job in windows.yml as self-documentation. The php-windows-builder/release@v1 action calls POST /releases which requires contents write scope. Both were necessary; belt and suspenders. Retagging 0.1.0 at the new HEAD so the release build runs against this fix.
1 parent 341fa21 commit 1fc6cd1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/windows.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ jobs:
4343
if: startsWith(github.ref, 'refs/tags/')
4444
needs: windows-build
4545
runs-on: ubuntu-latest
46+
# Explicit write scope for releases; default GITHUB_TOKEN is read-only
47+
# for the contents permission on newly-created repos and the
48+
# php-windows-builder/release@v1 action calls POST /releases.
49+
permissions:
50+
contents: write
4651
steps:
4752
- uses: actions/checkout@v6
4853

0 commit comments

Comments
 (0)