From 20c9b455617f23b897bb56c2d6475f8f92891d78 Mon Sep 17 00:00:00 2001 From: matu6968 Date: Sun, 29 Sep 2024 13:00:48 +0200 Subject: [PATCH] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 48f6053..626b8d4 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -18,6 +18,16 @@ jobs: with: go-version: '1.23.1' + - name: Check if main.go was modified + id: check_main_go + run: | + git fetch origin main + if git diff --name-only HEAD origin/main | grep -q 'main.go'; then + echo "main_go_modified=true" >> $GITHUB_ENV + else + echo "main_go_modified=false" >> $GITHUB_ENV + fi + - name: Build Go binary for Linux if: env.main_go_modified == 'true' run: | @@ -40,7 +50,7 @@ jobs: if: env.main_go_modified == 'true' run: | go mod tidy - GOOS=darwin GOARCH=386 go build -o s3-client_darwin.x86_64.app + GOOS=darwin GOARCH=amd64 go build -o s3-client_darwin.x86_64.app - name: Build Go binary for Mac OS (ARM64) if: env.main_go_modified == 'true'