Skip to content

Add goreleaser action #6

Add goreleaser action

Add goreleaser action #6

Workflow file for this run

name: goreleaser
on:
push:
tags:
- '*'
permissions:
contents: write
packages: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
# We need buildx so we can do multi-arch Docker builds with goreleaser
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Goreleaser's auto-login doesn't work as expected, so we work around it
# by manually logging in using the actions provided GITHUB_TOKEN.
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}