Skip to content

Commit

Permalink
unify and simplify build files
Browse files Browse the repository at this point in the history
  • Loading branch information
amo13 committed Oct 10, 2021
1 parent 8f0432b commit 9afeed4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ jobs:

- uses: actions/upload-artifact@v2
with:
name: Anarchy-Droid (MacOS binary)
name: Anarchy-Droid_windows_amd64
path: build
4 changes: 2 additions & 2 deletions .github/workflows/build-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 9afeed4

Please sign in to comment.