-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.45 KB
/
Copy pathbuild-mac.yml
File metadata and controls
49 lines (42 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build and Release macOS Desktop App
permissions:
contents: write
on:
push:
branches:
- main
tags:
- 'v*' # Run on version tags
workflow_dispatch: # Allow manual triggering
jobs:
build:
strategy:
matrix:
runtime: [osx-x64, osx-arm64]
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.x
- name: Build macOS Desktop App
run: dotnet publish src/MakaMek.MapEditor.Desktop/MakaMek.MapEditor.Desktop.csproj -c Release -r ${{ matrix.runtime }} --self-contained true -p:PublishSingleFile=true -o ./publish-${{ matrix.runtime }}
# For tagged releases only
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./publish-${{ matrix.runtime }}/*
draft: false
prerelease: false
generate_release_notes: false # Only one pipeline generates release notes
# For all builds (including main branch pushes and manual runs)
- name: Upload macOS Desktop App as Artifact
uses: actions/upload-artifact@v4
with:
name: MakaMek-MapEditor-macOS-${{ matrix.runtime }}
path: ./publish-${{ matrix.runtime }}/*
retention-days: 90 # Keep artifacts for 90 days