Fix mac publishing

pull/16/head
Miepee 4 years ago committed by GitHub
parent 078991d62d
commit a2aad019c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,12 +17,15 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
COMMAND: Atomic.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -r ubuntu.18.04-x64 --no-self-contained -o builds/ubuntu-latest -p:BuildPlatform=Gtk COMMAND: Atomic.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -r ubuntu.18.04-x64 --no-self-contained -o builds/ubuntu-latest -p:BuildPlatform=Gtk
ARTIFACT: builds/ubuntu-latest ARTIFACT: builds/ubuntu-latest
POSTBUILD: echo "nothing to do!"
- os: macOS-latest - os: macOS-latest
COMMAND: Atomic.Mac -r osx-x64 --no-self-contained -o builds/macOS-latest COMMAND: Atomic.Mac -o builds/macOS-latest
ARTIFACT: builds/macOS-latest ARTIFACT: Atomic/builds/macOS-latest
POSTBUILD: rm -r Atomic/builds/macOS-latest/* && mv Atomic/Atomic.Mac/bin/Release/net6.0-macos/Atomic.Mac.app Atomic/builds/macOS-latest/Atomic.Mac.app
- os: windows-latest - os: windows-latest
COMMAND: Atomic.Wpf -p:PublishSingleFile=true -p:DebugType=embedded -r win-x86 --no-self-contained -o builds/windows-latest COMMAND: Atomic.Wpf -p:PublishSingleFile=true -p:DebugType=embedded -r win-x86 --no-self-contained -o builds/windows-latest
ARTIFACT: builds/windows-latest ARTIFACT: builds/windows-latest
POSTBUILD: echo "nothing to do!"
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -37,7 +40,9 @@ jobs:
- name: Build - name: Build
run: dotnet publish ${{ matrix.COMMAND }} -c "${{ matrix.configuration }}" run: dotnet publish ${{ matrix.COMMAND }} -c "${{ matrix.configuration }}"
- name: Post-Build - name: Post-Build
run: cp ./LICENSE ./${{ matrix.ARTIFACT }}/ run: |
cp ./LICENSE ./${{ matrix.ARTIFACT }}/
${{ matrix.POSTBUILD }}
# Steps for uploading artifacts. # Steps for uploading artifacts.
- name: Zip to Archive - name: Zip to Archive
run: 7z a -tzip ${{ matrix.os }}.zip ./${{ matrix.ARTIFACT }} run: 7z a -tzip ${{ matrix.os }}.zip ./${{ matrix.ARTIFACT }}

@ -1,14 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0-macos</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<OutputType>WinExe</OutputType> <OutputType>Exe</OutputType>
<RuntimeIdentifiers>osx-x64;osx-arm64</RuntimeIdentifiers>
<SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion>
<RollForward>LatestMajor</RollForward> <RollForward>LatestMajor</RollForward>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Eto.Platform.Mac64" Version="2.7.2" /> <PackageReference Include="Eto.Platform.macOS" Version="2.7.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -7,7 +7,7 @@ class Program
[STAThread] [STAThread]
static void Main(string[] args) static void Main(string[] args)
{ {
var application = new Application(Eto.Platforms.Mac64); var application = new Application(Eto.Platforms.macOS);
application.UnhandledException += ApplicationOnUnhandledException; application.UnhandledException += ApplicationOnUnhandledException;
try try
{ {

Loading…
Cancel
Save