From f107b3c61abfcb1e4ffef577dd27fb9a99caa1b7 Mon Sep 17 00:00:00 2001 From: Meta Spartan Date: Tue, 30 Apr 2024 11:51:13 -0600 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14cdcc7..3daa1e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,10 @@ on: jobs: release: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v4 @@ -17,25 +20,30 @@ jobs: with: go-version: '1.20' # Ensure this is the version you want to use - - name: Download macOS SDK - run: | - curl -L -o MacOSX13.3.sdk.tar.xz "https://github.com/joseluisq/macosx-sdks/releases/download/13.3/MacOSX13.3.sdk.tar.xz" - sudo mkdir -p /opt/MacOSX13.3.sdk - sudo tar -xJf MacOSX13.3.sdk.tar.xz -C /opt/MacOSX13.3.sdk - - name: Install fyne-cross run: go install github.com/fyne-io/fyne-cross@latest - name: Install X11 development libraries + if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libgl1-mesa-dev libxi-dev libxext-dev libglu1-mesa-dev xorg-dev + - name: Download macOS SDK + if: matrix.os == 'macos-latest' + run: | + curl -L -o MacOSX13.3.sdk.tar.xz "https://github.com/joseluisq/macosx-sdks/releases/download/13.3/MacOSX13.3.sdk.tar.xz" + sudo mkdir -p /opt/MacOSX13.3.sdk + sudo tar -xJf MacOSX13.3.sdk.tar.xz -C /opt/MacOSX13.3.sdk + - name: Build run: | - fyne-cross windows -arch=amd64 -icon icon.png - fyne-cross linux -arch=amd64 -icon icon.png - fyne-cross darwin -arch=arm64 -icon icon.png --macosx-sdk-path /opt/MacOSX13.3.sdk -app-id com.contextlabs.ollamark + if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then + fyne-cross windows -arch=amd64 -icon icon.png + fyne-cross linux -arch=amd64 -icon icon.png + elif [ "${{ matrix.os }}" == "macos-latest" ]; then + fyne-cross darwin -arch=arm64 -icon icon.png --macosx-sdk-path /opt/MacOSX13.3.sdk -app-id com.contextlabs.ollamark + fi env: FYNE_CROSS_TARGETS: windows/amd64 linux/amd64 darwin/arm64 FYNE_CROSS_DARWIN_SDK: /opt/MacOSX13.3.sdk