Skip to content

Commit

Permalink
Add permissions for read and write in build.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
cmendible committed Feb 2, 2024
1 parent cd43623 commit c75afa3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
build:
name: Build ${{ matrix.target_os }}_${{ matrix.target_arch }} binaries
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
env:
GOVER: '1.21'
GOLANGCILINT_VER: v1.54
Expand Down Expand Up @@ -150,7 +153,8 @@ jobs:
needs: build
if: github.event_name != 'pull_request' && startswith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions: write-all
permissions:
contents: write
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
Expand Down Expand Up @@ -178,7 +182,8 @@ jobs:
publish:
name: Publish binaries
needs: release
permissions: write-all
permissions:
contents: write
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand Down Expand Up @@ -272,7 +277,6 @@ jobs:
bump-winget:
name: bump-winget
needs: publish
permissions: write-all
if: github.event_name != 'pull_request' && startswith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit c75afa3

Please sign in to comment.