From 7df92aad03e9af03e3001957cfb0e1e33c64d090 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
 <41898282+github-actions[bot]@users.noreply.github.com>
Date: Tue, 14 May 2024 22:11:39 +1000
Subject: [PATCH] Fix permissions for release.yaml (#7220) (#7221)

* Fix permissions for release.yaml

- 0.15.0 release currently borked

* Move permissions to individual job targets

(cherry picked from commit 3eae5096e337a2f3e19f95d0a30a385c0291536d)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
---
 .github/workflows/release.yaml | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index fd42145d0d..1a0069b91c 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -5,12 +5,12 @@ on:
   release:
     types: [published]
 
-permissions:
-  contents: read
-
 jobs:
   stable:
     runs-on: ubuntu-latest
+    permissions:
+      contents: write
+      pull-requests: write
     env:
       GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
     steps:
@@ -30,6 +30,9 @@ jobs:
 
   publish-build:
     runs-on: ubuntu-latest
+    permissions:
+      contents: write
+      pull-requests: write
     steps:
       - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5
       - name: Environment Setup