Update .gitea/workflows/build.yaml
All checks were successful
Release Version / build (push) Successful in 8s

This commit is contained in:
leafus 2024-09-29 05:07:22 +02:00
parent 55bc83b82b
commit 7eb9f7ce4a

View File

@ -18,12 +18,24 @@ jobs:
with: with:
go-version: '1.23.1' 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 - name: Build Go binary for Linux
if: env.main_go_modified == 'true'
run: | run: |
go mod tidy go mod tidy
go build -o s3-client_linux.x86_64 go build -o s3-client_linux.x86_64
- name: Build Go binary for Windows - name: Build Go binary for Windows
if: env.main_go_modified == 'true'
run: | run: |
GOOS=windows GOARCH=amd64 go build -o s3-client_windows.x86_64.exe GOOS=windows GOARCH=amd64 go build -o s3-client_windows.x86_64.exe