Publish Demo #26
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: Publish Demo | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| win-x64: | |
| description: 'Windows x64' | |
| default: false | |
| type: boolean | |
| win-x64-aot: | |
| description: 'Windows x64 AOT' | |
| default: false | |
| type: boolean | |
| linux-x64: | |
| description: 'Linux x64' | |
| default: false | |
| type: boolean | |
| linux-x64-aot: | |
| description: 'Linux x64 AOT' | |
| default: false | |
| type: boolean | |
| drm-linux-x64: | |
| description: 'DRM Linux x64' | |
| default: false | |
| type: boolean | |
| drm-linux-x64-aot: | |
| description: 'DRM Linux x64 AOT' | |
| default: false | |
| type: boolean | |
| osx-arm64: | |
| description: 'macOS arm64' | |
| default: false | |
| type: boolean | |
| osx-arm64-aot: | |
| description: 'macOS arm64 AOT' | |
| default: false | |
| type: boolean | |
| android-arm64: | |
| description: 'Android arm64' | |
| default: false | |
| type: boolean | |
| workflow_call: | |
| inputs: | |
| win-x64: | |
| type: boolean | |
| default: true | |
| win-x64-aot: | |
| type: boolean | |
| default: true | |
| linux-x64: | |
| type: boolean | |
| default: true | |
| linux-x64-aot: | |
| type: boolean | |
| default: true | |
| drm-linux-x64: | |
| type: boolean | |
| default: true | |
| drm-linux-x64-aot: | |
| type: boolean | |
| default: true | |
| osx-arm64: | |
| type: boolean | |
| default: true | |
| osx-arm64-aot: | |
| type: boolean | |
| default: true | |
| android-arm64: | |
| type: boolean | |
| default: true | |
| jobs: | |
| win-x64: | |
| if: ${{inputs.win-x64}} | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Publish win-x64 | |
| run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: Semi.Avalonia.Demo.Desktop.win-x64 | |
| path: | | |
| publish | |
| !publish/*.pdb | |
| win-x64-aot: | |
| if: ${{inputs.win-x64-aot}} | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Enable Native AOT in .csproj | |
| run: sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj | |
| - name: Publish win-x64 AOT | |
| run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o publish | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT | |
| path: | | |
| publish | |
| !publish/*.pdb | |
| linux-x64: | |
| if: ${{inputs.linux-x64}} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Publish linux-x64 | |
| run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: Semi.Avalonia.Demo.Desktop.linux-x64 | |
| path: | | |
| publish | |
| !publish/*.pdb | |
| linux-x64-aot: | |
| if: ${{inputs.linux-x64-aot}} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Enable Native AOT in .csproj | |
| run: sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj | |
| - name: Publish linux-x64 AOT | |
| run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release -o publish | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: Semi.Avalonia.Demo.Desktop.linux-x64.NativeAOT | |
| path: | | |
| publish | |
| !publish/*.pdb | |
| drm-linux-x64: | |
| if: ${{inputs.drm-linux-x64}} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Publish linux-x64 DRM | |
| run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: Semi.Avalonia.Demo.Drm.linux-x64 | |
| path: | | |
| publish | |
| !publish/*.pdb | |
| drm-linux-x64-aot: | |
| if: ${{inputs.drm-linux-x64-aot}} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Enable Native AOT in .csproj | |
| run: sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj | |
| - name: Publish linux-x64 AOT | |
| run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release -o publish | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: Semi.Avalonia.Demo.Drm.linux-x64.NativeAOT | |
| path: | | |
| publish | |
| !publish/*.pdb | |
| osx-arm64: | |
| if: ${{inputs.osx-arm64}} | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Publish osx-arm64 | |
| run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r osx-arm64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: Semi.Avalonia.Demo.Desktop.osx-arm64 | |
| path: | | |
| publish | |
| !publish/*.pdb | |
| osx-arm64-aot: | |
| if: ${{inputs.osx-arm64-aot}} | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Enable Native AOT in .csproj | |
| run: sed -i '' 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj | |
| - name: Publish osx-arm64 AOT | |
| run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r osx-arm64 -c Release -o publish | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: Semi.Avalonia.Demo.Desktop.osx-arm64.NativeAOT | |
| path: | | |
| publish | |
| !publish/*.pdb | |
| android-arm64: | |
| if: ${{inputs.android-arm64 }} | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: CD Android | |
| run: cd demo/Semi.Avalonia.Demo.Android | |
| - name: Restore Dependencies | |
| run: dotnet restore | |
| - name: Publish Android | |
| run: dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net9.0-android --no-restore -o publish /p:RuntimeIdentifier=android-arm64 | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: android-arm64 | |
| path: publish/*Signed.apk |