From f9131003d7778ef2f6d8d98859db58667a371c41 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 6 Oct 2023 15:59:49 -0400 Subject: [PATCH] Give the snapshot release the right permissions --- .github/workflows/snapshot-release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml index 6c69abfdc..752a2a697 100644 --- a/.github/workflows/snapshot-release.yml +++ b/.github/workflows/snapshot-release.yml @@ -19,6 +19,9 @@ jobs: name: Create a snapshot release of a pull request if: ${{ github.repository_owner == 'withastro' && github.event.issue.pull_request && startsWith(github.event.comment.body, '!preview') }} runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - name: "Check if user has admin access (only admins can publish snapshot releases)." uses: "lannonbr/repo-permission-check-action@2.0.0" @@ -80,8 +83,10 @@ jobs: - name: Publish Release id: publish run: | - pnpm run release --tag next--${{ steps.getSnapshotName.outputs.result }} + pnpm run release --tag next--${{ steps.getSnapshotName.outputs.result }} > publish.output.txt 2>&1 echo "Release complete" + cat publish.output.txt + echo ::set-output name=result::`cat publish.output.txt` env: # Needs access to publish to npm NPM_TOKEN: ${{ secrets.NPM_TOKEN }}