Fix macOS build

This commit is contained in:
Victor Tran 2022-04-27 11:51:20 +10:00 committed by GitHub
parent 795a775eab
commit b47c18c3f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -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/