Skip to content

Commit

Permalink
try fix macos (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee authored Jan 2, 2024
1 parent b1d388f commit 274d38f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}"
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions AM2RLauncher/AM2RLauncher.Mac/AM2RLauncher.Mac.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0-macos</TargetFramework>
<TargetFramework>net8.0-macos</TargetFramework>
<RuntimeIdentifiers>osx-x64;osx-arm64</RuntimeIdentifiers>
<SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion>10.15</SupportedOSPlatformVersion>
<RollForward>LatestMajor</RollForward>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
Expand Down Expand Up @@ -43,4 +43,4 @@
<BundleResource Include="Icon.icns" />
<BundleResource Include="Info.plist" />
</ItemGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions AM2RLauncher/AM2RLauncher.Mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.14</string>
<string>10.15</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
</dict>
</plist>
</plist>

0 comments on commit 274d38f

Please sign in to comment.