Files
guh/.github/workflows/compile.yaml
T
2026-07-20 20:50:58 +08:00

41 lines
1.2 KiB
YAML

name: GUH Builder
on:
push:
branches:
- '**'
jobs:
build:
name: Build for ${{ matrix.os-name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
os-name: Linux Ubuntu
artifact-name: GUH-Linux
- os: windows-latest
os-name: Windows
artifact-name: GUH-Windows.exe
- os: macos-latest
os-name: macOS
artifact-name: GUH-macOS
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Build
shell: bash
run: go build -ldflags "-X 'github.com/daveberrys/guh/src/cmd/cli.Version=$(git rev-parse --short HEAD)'" -o ${{ matrix.artifact-name }}
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.artifact-name }}