From 9afeed42ba10ee8d742b4333ca2b9b6ccb4f72e9 Mon Sep 17 00:00:00 2001 From: Amaury Bodet Date: Mon, 11 Oct 2021 00:12:52 +0200 Subject: [PATCH] unify and simplify build files --- .github/workflows/build-linux.yml | 21 ++++++++------------- .github/workflows/build-mac.yml | 2 +- .github/workflows/build-win.yml | 4 ++-- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 40df4f5..4a4a8c5 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -23,21 +23,16 @@ jobs: - name: Build run: go build -ldflags "-X main.BuildDate=`date +%Y-%m-%d` -X main.AppVersion=`awk -F'[ ="]+' '$1 == "Version" { print $2 }' FyneApp.toml`" -o build/ . && mv build/anarchy-droid build/Anarchy-Droid_linux_amd64 - - name: Install fyne - run: go get fyne.io/fyne/v2/cmd/fyne +# - name: Install fyne +# run: go get fyne.io/fyne/v2/cmd/fyne - - name: Package (Linux) - run: fyne package -release -executable build/Anarchy-Droid_linux_amd64 && ls -l && mkdir pkg && mv Anarchy-Droid.tar.* pkg/ +# - name: Package (Linux) +# run: fyne package -release -executable build/Anarchy-Droid_linux_amd64 && ls -l && mkdir pkg && mv Anarchy-Droid.tar.* pkg/ - - uses: actions/upload-artifact@v2 - with: - name: Anarchy-Droid (Linux) - path: pkg - - - uses: actions/upload-artifact@v2 - with: - name: Anarchy-Droid (Linux binary) - path: build +# - uses: actions/upload-artifact@v2 +# with: +# name: Anarchy-Droid (Linux) +# path: pkg - uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml index 9889ca1..f977b6e 100644 --- a/.github/workflows/build-mac.yml +++ b/.github/workflows/build-mac.yml @@ -33,5 +33,5 @@ jobs: - uses: actions/upload-artifact@v2 with: - name: Anarchy-Droid (MacOS binary) + name: Anarchy-Droid_windows_amd64 path: build diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml index 96315d7..4d252ff 100644 --- a/.github/workflows/build-win.yml +++ b/.github/workflows/build-win.yml @@ -21,7 +21,7 @@ jobs: run: chmod +x ./updateAppVersionAndBuildDate.sh && ./updateAppVersionAndBuildDate.sh - name: Cross-compile for Windows - run: CC=/usr/bin/x86_64-w64-mingw32-gcc-win32 CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -ldflags "-X main.BuildDate=`date +%Y-%m-%d` -X main.AppVersion=`awk -F'[ ="]+' '$1 == "Version" { print $2 }' FyneApp.toml`" -o build/ . && mv build/anarchy-droid.exe build/Anarchy-Droid.exe + run: CC=/usr/bin/x86_64-w64-mingw32-gcc-win32 CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -ldflags "-X main.BuildDate=`date +%Y-%m-%d` -X main.AppVersion=`awk -F'[ ="]+' '$1 == "Version" { print $2 }' FyneApp.toml`" -o build/ . && mv build/anarchy-droid.exe build/Anarchy-Droid_windows_amd64.exe # - name: Install fyne # run: go get fyne.io/fyne/v2/cmd/fyne @@ -42,4 +42,4 @@ jobs: - uses: actions/upload-artifact@v2 with: name: Anarchy-Droid (Windows binary) - path: build/Anarchy-Droid.exe + path: build/Anarchy-Droid_windows_amd64.exe