From 274d38fab7a6cad1ef97eec455bcf25d886c69ab Mon Sep 17 00:00:00 2001 From: Miepee <38186597+Miepee@users.noreply.github.com> Date: Tue, 2 Jan 2024 20:09:58 +0100 Subject: [PATCH] try fix macos (#65) --- .github/workflows/build-and-publish.yml | 9 ++++++--- .github/workflows/build.yml | 11 +++++++---- AM2RLauncher/AM2RLauncher.Mac/AM2RLauncher.Mac.csproj | 6 +++--- AM2RLauncher/AM2RLauncher.Mac/Info.plist | 4 ++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index d054c4a..ec8fe2f 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -8,14 +8,14 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] + os: [ubuntu-latest, macos-13, windows-latest] configuration: [Release] include: - os: ubuntu-latest COMMAND: AM2RLauncher.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -r ubuntu.18.04-x64 --no-self-contained -o builds/ubuntu-latest ARTIFACT: AM2RLauncher/builds/ubuntu-latest POSTBUILD: echo "No post build to do!" - - os: macOS-latest + - os: macos-13 COMMAND: AM2RLauncher.Mac -o builds/macOS-latest ARTIFACT: AM2RLauncher/builds/macOS-latest POSTBUILD: rm -r AM2RLauncher/builds/macOS-latest/* && mv AM2RLauncher/AM2RLauncher.Mac/bin/Release/net6.0-macos/AM2RLauncher.Mac.app AM2RLauncher/builds/macOS-latest/AM2RLauncher.Mac.app @@ -32,13 +32,16 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.x + dotnet-version: 8.x.x - name: Install Mac workload working-directory: ./AM2RLauncher run: dotnet workload install macos && dotnet workload restore - name: Restore dependencies working-directory: ./AM2RLauncher run: dotnet restore + - name: Switch XCode + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app/Contents/Developer + if: matrix.os == 'macos-13' - name: Build working-directory: ./AM2RLauncher run: dotnet publish ${{ matrix.COMMAND }} -c "${{ matrix.configuration }}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16501cb..4e474f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,13 +16,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] + os: [ubuntu-latest, macos-13, windows-latest] configuration: [Release] include: - os: ubuntu-latest COMMAND: AM2RLauncher.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -r ubuntu.18.04-x64 --no-self-contained ARTIFACT: AM2RLauncher/AM2RLauncher.Gtk/bin/Release/net6.0/ubuntu.18.04-x64/publish/ - - os: macOS-latest + - os: macos-13 COMMAND: AM2RLauncher.Mac -o builds/macOS-latest ARTIFACT: AM2RLauncher/builds/macOS-latest - os: windows-latest @@ -36,10 +36,13 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.x + dotnet-version: 8.x.x - name: Install Mac workload working-directory: ./AM2RLauncher - run: dotnet workload install macos + run: dotnet workload install macos && dotnet workload restore + - name: Switch XCode + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app/Contents/Developer + if: matrix.os == 'macos-13' - name: Restore dependencies working-directory: ./AM2RLauncher run: dotnet restore diff --git a/AM2RLauncher/AM2RLauncher.Mac/AM2RLauncher.Mac.csproj b/AM2RLauncher/AM2RLauncher.Mac/AM2RLauncher.Mac.csproj index 5c90b51..a6dae95 100644 --- a/AM2RLauncher/AM2RLauncher.Mac/AM2RLauncher.Mac.csproj +++ b/AM2RLauncher/AM2RLauncher.Mac/AM2RLauncher.Mac.csproj @@ -2,9 +2,9 @@ Exe - net6.0-macos + net8.0-macos osx-x64;osx-arm64 - 10.14 + 10.15 LatestMajor Debug;Release AnyCPU @@ -43,4 +43,4 @@ - \ No newline at end of file + diff --git a/AM2RLauncher/AM2RLauncher.Mac/Info.plist b/AM2RLauncher/AM2RLauncher.Mac/Info.plist index 715d57c..3d07d4d 100644 --- a/AM2RLauncher/AM2RLauncher.Mac/Info.plist +++ b/AM2RLauncher/AM2RLauncher.Mac/Info.plist @@ -9,7 +9,7 @@ CFBundleShortVersionString 1.0 LSMinimumSystemVersion - 10.14 + 10.15 CFBundleDevelopmentRegion en NSHumanReadableCopyright @@ -17,4 +17,4 @@ CFBundleIconFile Icon.icns - \ No newline at end of file +