why the hell was this random photo being here for months #113
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build and publish for macOS (x64) | |
run: | | |
cd SkEditor | |
dotnet restore | |
dotnet publish -c Release -r osx-x64 -p:PublishSingleFile=true --no-self-contained /p:DebugType=None /p:DebugSymbols=false | |
- name: Create .app structure | |
run: | | |
mkdir -p "SkEditor.app/Contents/MacOS" | |
mkdir -p "SkEditor.app/Contents/Resources" | |
cp -r SkEditor/bin/Release/net8.0/osx-x64/publish/* "SkEditor.app/Contents/MacOS/" | |
cp SkEditor/Info.plist "SkEditor.app/Contents/" | |
cp SkEditor/SkEditor.icns "SkEditor.app/Contents/Resources/" | |
- name: Set execute permissions | |
run: | | |
find SkEditor.app/Contents/MacOS/ -type f -exec chmod +x {} \; | |
- name: Zip .app package | |
run: | | |
zip -r SkEditorMac.zip SkEditor.app | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: SkEditorMac | |
path: SkEditorMac.zip | |
# now build osx-arm64 | |
- name: Build and publish for macOS (arm64) | |
run: | | |
cd SkEditor | |
dotnet restore | |
dotnet publish -c Release -r osx-arm64 -p:PublishSingleFile=true --no-self-contained /p:DebugType=None /p:DebugSymbols=false | |
- name: Create .app structure (arm64) | |
run: | | |
mkdir -p "SkEditor.app/Contents/MacOS" | |
mkdir -p "SkEditor.app/Contents/Resources" | |
cp -r SkEditor/bin/Release/net8.0/osx-arm64/publish/* "SkEditor.app/Contents/MacOS/" | |
cp SkEditor/Info.plist "SkEditor.app/Contents/" | |
cp SkEditor/SkEditor.icns "SkEditor.app/Contents/Resources/" | |
- name: Set execute permissions (arm64) | |
run: | | |
find SkEditor.app/Contents/MacOS/ -type f -exec chmod +x {} \; | |
- name: Zip .app package (arm64) | |
run: | | |
zip -r SkEditorMac-arm64.zip SkEditor.app | |
- name: Upload artifacts (arm64) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: SkEditorMac-arm64 | |
path: SkEditorMac-arm64.zip |