Skip to content

ci: GoReleaser release pipeline (cross-compiled binaries + multi-arch… #1

ci: GoReleaser release pipeline (cross-compiled binaries + multi-arch…

ci: GoReleaser release pipeline (cross-compiled binaries + multi-arch… #1

Workflow file for this run

name: Release
# Cuts a release on every semver tag push (e.g. v0.1.0). GoReleaser cross-
# compiles the static binaries, builds the changelog + checksums, publishes a
# (draft) GitHub Release with the archives attached, and pushes multi-arch
# images to GHCR.
on:
push:
tags:
- "v*"
permissions:
contents: write # create the GitHub Release + upload archives
packages: write # push images to ghcr.io
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history so GoReleaser can build the changelog
- uses: actions/setup-go@v5
with:
go-version: "1.26"
check-latest: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}