Skip to content

ci: Try different runners even harder #43

ci: Try different runners even harder

ci: Try different runners even harder #43

Workflow file for this run

name: goreleaser
on:
push:
tags:
- "*"
workflow_dispatch: # Allow triggering manually.
# ${{ secrets.GH_PAT }}
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
# --- Install CGO deps per OS ---
- name: Setup Linux build environment
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install -y build-essential
- name: Setup macOS build environment
if: startsWith(matrix.os, 'macos')
run: brew install gcc
- name: Setup Windows build environment
if: startsWith(matrix.os, 'windows')
run: |
choco install mingw
echo "Path=C:/tools/mingw64/bin;$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Set build ID
id: buildid
run: |
case "${{ runner.os }}" in
macOS)
echo "id=darwin-build" >> $GITHUB_OUTPUT
;;
Windows)
echo "id=windows-build" >> $GITHUB_OUTPUT
;;
Linux)
echo "id=linux-build" >> $GITHUB_OUTPUT
;;
*)
echo "id=unknown-runner-os-${{ runner.os }}" >> $GITHUB_OUTPUT
;;
esac
shell: bash
- name: Build with GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean --id ${{ steps.buildid.outputs.id }} --skip-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.os }}
path: |
dist/*
if-no-files-found: error