From e1b9a7fcf55946b058cde8ccf7c5cfc82d02c2d6 Mon Sep 17 00:00:00 2001 From: XOF Date: Sat, 27 Dec 2025 18:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20.gitea/workflows/build.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yml | 61 -------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml deleted file mode 100644 index b3fcc9e..0000000 --- a/.gitea/workflows/build.yml +++ /dev/null @@ -1,61 +0,0 @@ -# .gitea/workflows/build.yml -name: Build GHub - -on: - push: - branches: - - main - - master - tags: - - 'v*' - pull_request: - branches: - - main - - master - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: 检出代码 - uses: actions/checkout@v4 - - - name: 设置 Go 环境 - uses: actions/setup-go@v5 - with: - go-version: '1.25' - - - name: 获取版本信息 - id: version - run: | - if [[ $GITHUB_REF == refs/tags/* ]]; then - VERSION=${GITHUB_REF#refs/tags/} - else - VERSION=$(git describe --tags --always --dirty 2>/dev/null || echo "dev") - fi - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "构建版本: $VERSION" - - - name: 编译 Windows ARM64 - run: | - GOOS=windows GOARCH=arm64 go build -ldflags="-s -w -X main.Version=${{ steps.version.outputs.version }}" -o GHub-windows-arm64.exe - - - name: 编译 Linux AMD64 - run: | - GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.Version=${{ steps.version.outputs.version }}" -o GHub-linux-amd64 - - - name: 上传构建产物 - uses: actions/upload-artifact@v4 - with: - name: GHub-${{ steps.version.outputs.version }} - path: | - GHub-windows-arm64.exe - GHub-linux-amd64 - - - name: 创建 Release - if: startsWith(github.ref, 'refs/tags/') - uses: actions/gitea-release@v1 - with: - files: | - GHub-windows-arm64.exe - GHub-linux-amd64