Merge pull request #53 from anton-makarevich/opencode/issue51-2026062… #36
This file contains hidden or 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 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 |