name: Publish Demo on: workflow_dispatch: inputs: win-x64: description: 'Windows x64' required: true default: false type: boolean win-x64-aot: description: 'Windows x64 AOT' required: true default: false type: boolean linux-x64: description: 'Linux x64' required: true default: false type: boolean linux-x64-aot: description: 'Linux x64 AOT' required: true default: false type: boolean osx-arm64: description: 'macOS arm64' required: true default: false type: boolean osx-arm64-aot: description: 'macOS arm64 AOT' required: true default: false type: boolean android-arm64: description: 'Android arm64' required: true default: false type: boolean jobs: win-x64: if: ${{ github.event.inputs.win-x64 == 'true' }} runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Publish win-x64 run: dotnet publish demo/Ursa.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: Ursa.Demo.Desktop.win-x64 path: | publish !publish/*.pdb win-x64-aot: if: ${{ github.event.inputs.win-x64-aot == 'true' }} runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Enable Native AOT in .csproj run: | sed -i 's##true#' demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj sed -i 's##true#' demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj - name: Publish win-x64 AOT run: dotnet publish demo/Ursa.Demo.Desktop -r win-x64 -c Release -o publish - name: Upload a Build Artifact uses: actions/upload-artifact@v4.6.2 with: name: Ursa.Demo.Desktop.win-x64.NativeAOT path: | publish !publish/*.pdb linux-x64: if: ${{ github.event.inputs.linux-x64 == 'true' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Publish linux-x64 run: dotnet publish demo/Ursa.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: Ursa.Demo.Desktop.linux-x64 path: | publish !publish/*.pdb linux-x64-aot: if: ${{ github.event.inputs.linux-x64-aot == 'true' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Enable Native AOT in .csproj run: | sed -i 's##true#' demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj sed -i 's##true#' demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj - name: Publish linux-x64 AOT run: dotnet publish demo/Ursa.Demo.Desktop -r linux-x64 -c Release -o publish - name: Upload a Build Artifact uses: actions/upload-artifact@v4.6.2 with: name: Ursa.Demo.Desktop.linux-x64.NativeAOT path: | publish !publish/*.pdb osx-arm64: if: ${{ github.event.inputs.osx-arm64 == 'true' }} runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Publish osx-arm64 run: dotnet publish demo/Ursa.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: Ursa.Demo.Desktop.osx-arm64 path: | publish !publish/*.pdb osx-arm64-aot: if: ${{ github.event.inputs.osx-arm64-aot == 'true' }} runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Enable Native AOT in .csproj run: | sed -i '' 's##true#' demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj sed -i '' 's##true#' demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj - name: Publish osx-arm64 AOT run: dotnet publish demo/Ursa.Demo.Desktop -r osx-arm64 -c Release -o publish - name: Upload a Build Artifact uses: actions/upload-artifact@v4.6.2 with: name: Ursa.Demo.Desktop.osx-arm64.NativeAOT path: | publish !publish/*.pdb android-arm64: if: ${{ github.event.inputs.android-arm64 == 'true' }} runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: CD Android run: cd demo/Ursa.Demo.Android - name: Restore Dependencies run: dotnet restore - name: Publish Android run: dotnet publish demo/Ursa.Demo.Android -c Release -f net8.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