177 lines
5.4 KiB
YAML
177 lines
5.4 KiB
YAML
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
|
|
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
|
|
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/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: ${{ 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/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: ${{ inputs.linux-x64 }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
- 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: ${{ 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/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: ${{ inputs.osx-arm64 }}
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
- 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: ${{ 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/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: ${{ inputs.android-arm64 }}
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
- name: Install Android workload
|
|
run: dotnet workload install android
|
|
- name: Restore Dependencies
|
|
run: dotnet restore demo/Ursa.Demo.Android
|
|
- name: Publish Android
|
|
run: dotnet publish demo/Ursa.Demo.Android -c Release -f net10.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 |