diff --git a/.gitignore b/.gitignore index 8a50848..59dd33a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /logs /.idea /.vscode +/.qwen *.mp3 -game-driver* \ No newline at end of file +game-driver* diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..4d04708 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,34 @@ +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.23-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