From 2066184ffd3617ac647a337aa77665ffea464028 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Wed, 24 Dec 2025 22:27:26 +0800 Subject: [PATCH] =?UTF-8?q?chore(=E8=87=AA=E5=8A=A8=E6=9E=84=E5=BB=BA):=20?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.sh | 3 +++ .gitea/workflows/build.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .gitea/workflows/build.sh create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.sh b/.gitea/workflows/build.sh new file mode 100644 index 0000000..bcce833 --- /dev/null +++ b/.gitea/workflows/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o release/alive_amd64.exe -trimpath -ldflags "-H windowsgui -s -w -buildid=" alive.go +GOOS=windows GOARCH=arm64 CGO_ENABLED=0 go build -o release/alive_arm64.exe -trimpath -ldflags "-H windowsgui -s -w -buildid=" alive.go \ No newline at end of file diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..df97218 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,24 @@ +on: [push, workflow_dispatch] +jobs: + build: + runs-on: cn + steps: + - name: checkout + uses: actions/checkout@v6 + - name: docker goenv + uses: docker://ccr.ccs.tencentyun.com/xiaoqidun/goenv:latest + env: + GIT_SERVER: ${{ secrets.git_server }} + GIT_USER: ${{ secrets.git_user }} + GIT_TOKEN: ${{ secrets.git_token }} + with: + args: bash .gitea/workflows/build.sh + - name: upload to cos + uses: xiaoqidun/gocos@main + with: + secret_id: ${{ secrets.cos_secret_id }} + secret_key: ${{ secrets.cos_secret_key }} + bucket_url: ${{ secrets.cos_bucket_url }} + source_path: release + target_path: product/alive + strip_prefix: release \ No newline at end of file