From b47c18c3f302244c72303c655a201fa8c757f869 Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Wed, 27 Apr 2022 11:51:20 +1000 Subject: [PATCH] Fix macOS build --- .github/workflows/macos.yml | 3 +++ Distribution/build-macos.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3eaaf2f..adc99e4 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -10,6 +10,7 @@ jobs: strategy: matrix: os: [macOS-latest] + arch: [x64] fail-fast: false runs-on: ${{ matrix.os }} steps: @@ -25,6 +26,8 @@ jobs: submodules: 'recursive' - name: "Build Project" run: ./build-macos.sh + env: + BUILD_ARCH: ${{ matrix.arch }} working-directory: Distribution - name: "Create Disk Image" run: appdmg Distribution/app-dmg-spec.json ./FRESHMusicPlayer.dmg diff --git a/Distribution/build-macos.sh b/Distribution/build-macos.sh index b7af3bb..145ff3b 100755 --- a/Distribution/build-macos.sh +++ b/Distribution/build-macos.sh @@ -8,11 +8,11 @@ RESOURCES_BUNDLE=$APP_BUNDLE/Contents/Resources rm -rf $APP_BUNDLE || true pushd FRESHMusicPlayer/FRESHMusicPlayer-Avalonia -dotnet publish -r osx-x64 +dotnet publish -r osx-$BUILD_ARC} popd mkdir -p $APP_BUNDLE/Contents/MacOS -cp -r "FRESHMusicPlayer/FRESHMusicPlayer-Avalonia/bin/Debug/net5.0/osx-x64/"* $APP_BUNDLE/Contents/MacOS +cp -r "FRESHMusicPlayer/FRESHMusicPlayer-Avalonia/bin/Debug/net"*"/osx-$BUILD_ARCH/"* $APP_BUNDLE/Contents/MacOS mkdir -p $RESOURCES_BUNDLE cp Distribution/icon.icns $RESOURCES_BUNDLE cp Distribution/Info.plist $APP_BUNDLE/Contents/ \ No newline at end of file