Fix Mac Build #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Release | |
on: | |
push: | |
branches: | |
- "master" | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- "master" | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Setup Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
## Install Dependencies | |
sudo apt update -y | |
sudo apt install -y docker git zip gzip tar | |
go install github.com/fyne-io/fyne-cross@latest | |
## Check out the macos SDK from git | |
git clone https://github.com/alexey-lysiuk/macos-sdk.git | |
## Build the App | |
~/go/bin/fyne-cross linux -arch=amd64,arm64 -app-id="OnionSoup" | |
~/go/bin/fyne-cross windows -arch=amd64,arm64 -app-id="Onion.Soup" | |
~/go/bin/fyne-cross darwin -arch=amd64,arm64 -app-id="Onion.Soup" --macosx-sdk-path $(pwd)/macos-sdk/MacOSX12.3.sdk | |
## Pack Up Each Release | |
mv fyne-cross/dist/linux-amd64/onionsoup.tar.xz fyne-cross/onionsoup_linux_amd64.tar.xz | |
mv fyne-cross/dist/linux-arm64/onionsoup.tar.xz fyne-cross/onionsoup_linux_arm64.tar.xz | |
mv fyne-cross/dist/windows-amd64/onionsoup.exe.zip fyne-cross/onionsoup_windows_amd64.exe.zip | |
mv fyne-cross/dist/windows-arm64/onionsoup.exe.zip fyne-cross/onionsoup_windows_arm64.exe.zip | |
tar -czf onionsoup_mac_amd64.tar.gz -C fyne-cross/dist/darwin-amd64/onionsoup.app onionsoup.app | |
tar -czf onionsoup_mac_arm64.tar.gz -C fyne-cross/dist/darwin-arm64/onionsoup.app onionsoup.app | |
mv onionsoup_mac_amd64.tar.gz fyne-cross/onionsoup_mac_amd64.tar.gz | |
mv onionsoup_mac_arm64.tar.gz fyne-cross/onionsoup_mac_arm64.tar.gz | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
LICENSE | |
fyne-cross/onionsoup_linux_amd64.tar.xz | |
fyne-cross/onionsoup_linux_arm64.tar.xz | |
fyne-cross/onionsoup_windows_amd64.exe.zip | |
fyne-cross/onionsoup_windows_arm64.exe.zip | |
fyne-cross/onionsoup_mac_amd64.tar.gz | |
fyne-cross/onionsoup_mac_arm64.tar.gz | |
token: ${{ secrets.GH_TOKEN }} |