From 4d4ecf8c112c89f867851defa85c5b8361ca210f Mon Sep 17 00:00:00 2001 From: leafus Date: Sun, 29 Sep 2024 04:43:26 +0200 Subject: [PATCH] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index f9125cd..f80b060 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -18,10 +18,14 @@ jobs: with: go-version: '1.23.1' - - name: Build Go binary + - name: Build Go binary for Linux run: | go mod tidy - go build -o s3-client + go build -o s3-client_linux.x86_64 + + - name: Build Go binary for Windows + run: | + GOOS=windows GOARCH=amd64 go build -o s3-client_windows.x86_64.exe - name: Get latest commit ID id: get_commit @@ -61,10 +65,17 @@ jobs: GITEA_TOKEN: ${{ secrets.TOKEN }} GITHUB_TOKEN: ${{ secrets.TOKEN }} - - name: Upload Go binary to release + - name: Upload Go binaries to release uses: softprops/action-gh-release@v1 with: - files: ./s3-client + files: | + ./s3-client_linux.x86_64 + ./s3-client_windows.x86_64.exe tag_name: ${{ env.new_version }} + name: Release ${{ env.new_version }} + body: | + Automatic release by Gitea CI + Release version ${{ env.new_version }}. + Commit ID: ${{ env.commit_id }} env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.TOKEN }}