Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
rid: win-x64
- os: ubuntu-latest
rid: win-arm64
- os: ubuntu-latest
rid: linux-x64
- os: ubuntu-latest
rid: linux-arm64
# - os: ubuntu-latest
# rid: win-x64
# - os: ubuntu-latest
# rid: win-arm64
# - os: ubuntu-latest
# rid: linux-x64
# - os: ubuntu-latest
# rid: linux-arm64
- os: macos-latest
rid: osx-arm64
- os: macos-latest
rid: osx-x64
# - os: macos-latest
# rid: osx-x64

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -67,21 +67,32 @@ jobs:
run: dotnet restore -r ${{ matrix.rid }}

- name: Publish
if: ${{ ! startsWith(matrix.rid, 'osx') }}
run: |
dotnet publish ${{ env.PROJECT_FOLDER}}/${{ env.PROJECT_NAME }} \
-c ${{ env.CONFIGURATION }} \
-r ${{ matrix.rid }} \
-p:Version=${{ steps.gitversion.outputs.SemVer }} \
-p:AssemblyVersion=${{ steps.gitversion.outputs.AssemblySemFileVer }} \
-o bin

- name: Publish
if: ${{ startsWith(matrix.rid, 'osx') }}
run: |
dotnet msbuild ${{ env.PROJECT_FOLDER}}/${{ env.PROJECT_NAME }} \
-t:BundleApp \
-p:RuntimeIdentifier=${{ matrix.rid }} \
-p:UseAppHost=true \
-p:Configuration=${{ env.CONFIGURATION }} \
-p:TargetFramework=net8.0

- name: Set Executable Bit
if: ${{ startsWith(matrix.rid, 'osx') }}
run: chmod -R +x bin/YMouseButtonControl
run: chmod -R +x ${{ env.PROJECT_FOLDER}}/bin/${{ env.CONFIGURATION }}/net8.0/${{ matrix.rid }}/publish/${{ env.APP_NAME }}.app

- name: Tar to Preserve Executable Bit
if: ${{ startsWith(matrix.rid, 'osx') }}
run: tar -cvf ${{ env.APP_NAME }}.${{ steps.gitversion.outputs.semVer }}+${{ matrix.rid }}.tar bin/
run: tar -C ${{ env.PROJECT_FOLDER}}/bin/${{ env.CONFIGURATION }}/net8.0/${{ matrix.rid }}/publish -cvf ${{ env.APP_NAME }}.${{ steps.gitversion.outputs.semVer }}+${{ matrix.rid }}.tar ${{ env.APP_NAME }}.app

- name: Upload build artifacts
if: ${{ startsWith(matrix.rid, 'osx') }}
Expand Down