Files
bleh/.gitea/workflows/build.yml
Ignacio Rivero 211acd9b83
Some checks failed
Build / build (amd64, linux) (push) Failing after 1m36s
Build / build (arm, 7, linux) (push) Failing after 8s
Build / build (arm64, linux) (push) Failing after 7s
Added Gitea build action
2026-05-04 03:36:57 -03:00

57 lines
1.2 KiB
YAML

name: Build
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: linux
goarch: arm
goarm: '7'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
- name: Download dependencies
run: go mod download
- name: Vet
run: go vet ./...
- name: Build
env:
CGO_ENABLED: '0'
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
run: |
out="bleh-${GOOS}-${GOARCH}${GOARM:+v$GOARM}"
go build -trimpath -ldflags='-s -w' -o "$out" .
echo "ARTIFACT=$out" >> "$GITHUB_ENV"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}
if-no-files-found: error