Files
findbaseport/.gitea/workflows/build.yml
T
2026-08-19 15:51:41 +02:00

56 lines
1.2 KiB
YAML

name: Build Release Binaries
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
name: linux-amd64
extension: ""
- goos: linux
goarch: arm64
name: linux-arm64
extension: ""
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
VERSION: ${{ gitea.ref_name }}
run: |
mkdir -p dist
go build \
-ldflags="-X main.version=${VERSION}" \
-o "dist/findbaseport-${{ matrix.name }}${{ matrix.extension }}" \
.
- name: Upload binary artifact
uses: actions/upload-artifact@v3
with:
name: findbaseport-${{ matrix.name }}
path: dist/findbaseport-${{ matrix.name }}${{ matrix.extension }}