From 4a27b5d7b70d0eb7457a2e443c2886ee4736d1fa Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Wed, 28 Jan 2026 21:35:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=87=AA=E5=8A=A8=E6=9E=84=E5=BB=BA):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8=E6=9E=84=E5=BB=BA=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.sh | 7 +++++++ .gitea/workflows/build.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 31 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..e3add2c --- /dev/null +++ b/.gitea/workflows/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -o release/symfs_386.exe -trimpath -ldflags "-s -w -buildid=" ./cmd/main.go +GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -o release/symfs_386_daemon.exe -trimpath -ldflags "-H windowsgui -s -w -buildid=" ./cmd/main.go +GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o release/symfs_amd64.exe -trimpath -ldflags "-s -w -buildid=" ./cmd/main.go +GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o release/symfs_amd64_daemon.exe -trimpath -ldflags "-H windowsgui -s -w -buildid=" ./cmd/main.go +GOOS=windows GOARCH=arm64 CGO_ENABLED=0 go build -o release/symfs_arm64.exe -trimpath -ldflags "-s -w -buildid=" ./cmd/main.go +GOOS=windows GOARCH=arm64 CGO_ENABLED=0 go build -o release/symfs_arm64_daemon.exe -trimpath -ldflags "-H windowsgui -s -w -buildid=" ./cmd/main.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..eeaa65a --- /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/symfs + strip_prefix: release \ No newline at end of file