Skip to content

Commit

Permalink
chore: add write permission for gh release
Browse files Browse the repository at this point in the history
  • Loading branch information
kipz committed Feb 10, 2025
1 parent 0739067 commit b7ef943
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ on:
push:
tags:
- "v*.*.*"

permissions:
contents: write
jobs:
publish:
name: Build and Publish
Expand All @@ -25,9 +26,9 @@ jobs:
mkdir -p dist
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o dist/cofidectl-${{ matrix.goos }}-${{ matrix.goarch }}-${{ github.ref_name }} ./cmd/cofidectl/main.go
- name: Upload artifacts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release list --limit 1 | grep -q ${{ github.ref_name }} || gh release create ${{ github.ref_name }} -d
gh release upload ${{ github.ref_name }} dist/cofidectl-${{ matrix.goos }}-${{ matrix.goarch }}-${{ github.ref_name }} --clobber
gh release upload ${{ github.ref_name }} LICENSE --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b7ef943

Please sign in to comment.