Files
game-driver/.woodpecker.yml
mapleafgo 809f123854
Some checks failed
ci/woodpecker/tag/woodpecker Pipeline was canceled
ci: 升级构建环境至 Go 1.24
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-07 17:54:23 +08:00

35 lines
1.0 KiB
YAML

when:
- event: tag
clone:
git:
image: docker.m.daocloud.io/woodpeckerci/plugin-git
settings:
depth: 1
steps:
# 构建多架构二进制文件
build:
image: docker.m.daocloud.io/golang:1.24-trixie
commands:
- apt-get update && apt-get install -y gcc-aarch64-linux-gnu gcc-x86-64-linux-gnu
- mkdir -p release
# 构建 amd64 (native)
- GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC=x86-64-linux-gnu-gcc go build -ldflags="-w -s" -o release/game-driver-linux-amd64 .
# 构建 arm64 (cross-compile)
- GOOS=linux GOARCH=arm64 CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc go build -ldflags="-w -s" -o release/game-driver-linux-arm64 .
# 发布构建产物(可选)
release:
image: docker.m.daocloud.io/woodpeckerci/plugin-release
settings:
base-url: https://gitea.tides.top
title: ${CI_COMMIT_TAG}
api-key:
from_secret: gitea_token
files:
- release/game-driver-linux-amd64
- release/game-driver-linux-arm64
depends_on:
- build