Skip to content

Commit

Permalink
chore(ci): give correct permissions to release workflow + login to ghcr.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed May 6, 2024
1 parent a6dc20e commit 86d173f
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

permissions:
contents: write # needed to write releases
id-token: write # needed for keyless signing
packages: write # needed for ghcr access

jobs:
release:
Expand All @@ -20,13 +25,18 @@ jobs:
go-version-file: 'go.mod'

- name: Install sodium
run: sudo apt-get install -y libsodium-dev
run: sudo apt-get install -y libsodium-dev

- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
- name: Publish release
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b #4.2.0
with:
distribution: goreleaser
version: v1.10.3
args: release --rm-dist --timeout 60m
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 86d173f

Please sign in to comment.