diff --git a/.github/workflows/pack-nightly.yml b/.github/workflows/pack-nightly.yml
index 540cea3..2b7ba13 100644
--- a/.github/workflows/pack-nightly.yml
+++ b/.github/workflows/pack-nightly.yml
@@ -10,23 +10,19 @@ on:
type: string
Ursa:
description: 'Pack Ursa'
- required: true
- default: 'true'
+ default: true
type: boolean
Ursa_Themes_Semi:
description: 'Pack Ursa.Themes.Semi'
- required: true
- default: 'true'
+ default: true
type: boolean
PrismExtension:
description: 'Pack Prism Extension'
- required: true
- default: 'false'
+ default: false
type: boolean
ReactiveUIExtension:
description: 'Pack ReactiveUI Extension'
- required: true
- default: 'false'
+ default: false
type: boolean
jobs:
@@ -40,23 +36,23 @@ jobs:
- name: Get Version
run: |
VERSION_TIMESTAMP=$(date +'%Y%m%d%H%M%S')
- VERSION="${{ github.event.inputs.Version_Prefix }}-nightly-${VERSION_TIMESTAMP}"
+ VERSION="${{ inputs.Version_Prefix }}-nightly-${VERSION_TIMESTAMP}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Pack Ursa
- if: ${{ github.event.inputs.Ursa == 'true' }}
+ if: ${{ inputs.Ursa }}
run: dotnet pack src/Ursa -o nugets /p:Version=${{ env.VERSION }}
- name: Pack Ursa.Themes.Semi
- if: ${{ github.event.inputs.Ursa_Themes_Semi == 'true' }}
+ if: ${{ inputs.Ursa_Themes_Semi }}
run: dotnet pack src/Ursa.Themes.Semi -o nugets /p:Version=${{ env.VERSION }}
- name: Pack Prism Extension
- if: ${{ github.event.inputs.PrismExtension == 'true' }}
+ if: ${{ inputs.PrismExtension }}
run: dotnet pack src/Ursa.PrismExtension -o nugets /p:Version=${{ env.VERSION }}
- name: Pack ReactiveUI Extension
- if: ${{ github.event.inputs.ReactiveUIExtension == 'true' }}
+ if: ${{ inputs.ReactiveUIExtension }}
run: dotnet pack src/Ursa.ReactiveUIExtension -o nugets /p:Version=${{ env.VERSION }}
- name: Add NuGet Source
diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml
index edf6b31..2c50c5f 100644
--- a/.github/workflows/pack.yml
+++ b/.github/workflows/pack.yml
@@ -3,25 +3,42 @@ name: Pack to NuGet
on:
workflow_dispatch:
inputs:
+ Upload_to_NuGet:
+ description: 'Upload to NuGet'
+ default: true
+ type: boolean
Ursa:
description: 'Pack Ursa'
- required: true
- default: 'true'
+ default: true
type: boolean
Ursa_Themes_Semi:
description: 'Pack Ursa.Themes.Semi'
- required: true
- default: 'true'
+ default: true
type: boolean
PrismExtension:
description: 'Pack Prism Extension'
- required: true
- default: 'false'
+ default: false
type: boolean
ReactiveUIExtension:
description: 'Pack ReactiveUI Extension'
- required: true
- default: 'false'
+ default: false
+ type: boolean
+ workflow_call:
+ inputs:
+ Upload_to_NuGet:
+ type: boolean
+ default: false
+ Ursa:
+ default: true
+ type: boolean
+ Ursa_Themes_Semi:
+ default: true
+ type: boolean
+ PrismExtension:
+ default: false
+ type: boolean
+ ReactiveUIExtension:
+ default: false
type: boolean
jobs:
@@ -32,22 +49,23 @@ jobs:
uses: actions/checkout@v4.1.1
- name: Pack Ursa
- if: ${{ github.event.inputs.Ursa == 'true' }}
+ if: ${{ inputs.Ursa }}
run: dotnet pack src/Ursa -o nugets
- name: Pack Ursa.Themes.Semi
- if: ${{ github.event.inputs.Ursa_Themes_Semi == 'true' }}
+ if: ${{ inputs.Ursa_Themes_Semi }}
run: dotnet pack src/Ursa.Themes.Semi -o nugets
- name: Pack Prism Extension
- if: ${{ github.event.inputs.PrismExtension == 'true' }}
+ if: ${{ inputs.PrismExtension }}
run: dotnet pack src/Ursa.PrismExtension -o nugets
- name: Pack ReactiveUI Extension
- if: ${{ github.event.inputs.ReactiveUIExtension == 'true' }}
+ if: ${{ inputs.ReactiveUIExtension }}
run: dotnet pack src/Ursa.ReactiveUIExtension -o nugets
- - name: Publish NuGet package
+ - name: Upload to NuGet
+ if: ${{ inputs.Upload_to_NuGet }}
run: dotnet nuget push "nugets/*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Upload a Build Artifact
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index eb0bee5..1dde577 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -5,49 +5,65 @@ on:
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
+ 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: ${{ github.event.inputs.win-x64 == 'true' }}
+ if: ${{ inputs.win-x64 }}
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
+ 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:
@@ -57,15 +73,13 @@ jobs:
!publish/*.pdb
win-x64-aot:
- if: ${{ github.event.inputs.win-x64-aot == 'true' }}
+ if: ${{ inputs.win-x64-aot }}
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
+ run: 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
@@ -77,13 +91,13 @@ jobs:
!publish/*.pdb
linux-x64:
- if: ${{ github.event.inputs.linux-x64 == 'true' }}
+ if: ${{ inputs.linux-x64 }}
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
+ 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:
@@ -93,15 +107,13 @@ jobs:
!publish/*.pdb
linux-x64-aot:
- if: ${{ github.event.inputs.linux-x64-aot == 'true' }}
+ if: ${{ inputs.linux-x64-aot }}
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
+ run: 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
@@ -113,13 +125,13 @@ jobs:
!publish/*.pdb
osx-arm64:
- if: ${{ github.event.inputs.osx-arm64 == 'true' }}
+ if: ${{ inputs.osx-arm64 }}
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
+ 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:
@@ -129,15 +141,13 @@ jobs:
!publish/*.pdb
osx-arm64-aot:
- if: ${{ github.event.inputs.osx-arm64-aot == 'true' }}
+ if: ${{ inputs.osx-arm64-aot }}
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
+ run: 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
@@ -149,7 +159,7 @@ jobs:
!publish/*.pdb
android-arm64:
- if: ${{ github.event.inputs.android-arm64 == 'true' }}
+ if: ${{ inputs.android-arm64 }}
runs-on: windows-latest
steps:
- name: Checkout
@@ -159,7 +169,7 @@ jobs:
- 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
+ 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:
diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml
index a83b61c..c6f8bc6 100644
--- a/.github/workflows/release-tag.yml
+++ b/.github/workflows/release-tag.yml
@@ -5,151 +5,43 @@ on:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
+ inputs:
+ Upload_to_NuGet:
+ description: 'Upload to NuGet'
+ default: false
+ type: boolean
+ Ursa:
+ description: 'Pack Ursa'
+ default: true
+ type: boolean
+ Ursa_Themes_Semi:
+ description: 'Pack Ursa.Themes.Semi'
+ default: true
+ type: boolean
+ PrismExtension:
+ description: 'Pack Prism Extension'
+ default: false
+ type: boolean
+ ReactiveUIExtension:
+ description: 'Pack ReactiveUI Extension'
+ default: false
+ type: boolean
jobs:
nuget:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Pack Ursa
- run: dotnet pack src/Ursa -o nugets
- - name: Pack Ursa.Themes.Semi
- run: dotnet pack src/Ursa.Themes.Semi -o nugets
+ uses: ./.github/workflows/pack.yml
+ with:
+ Upload_to_NuGet: ${{ inputs.Upload_to_NuGet }}
+ Ursa: ${{ inputs.Ursa }}
+ Ursa_Themes_Semi: ${{ inputs.Ursa_Themes_Semi }}
+ PrismExtension: ${{ inputs.PrismExtension }}
+ ReactiveUIExtension: ${{ inputs.ReactiveUIExtension }}
- - name: Upload a Build Artifact
- uses: actions/upload-artifact@v4.6.2
- with:
- name: nugets
- path: nugets
-
- win-x64:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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
+ publish:
+ uses: ./.github/workflows/publish.yml
draft-release:
- needs: [
- nuget,
- win-x64,win-x64-aot,
- linux-x64,linux-x64-aot,
- osx-arm64,osx-arm64-aot,
- android-arm64
- ]
+ needs: [ nuget,publish ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4.3.0
diff --git a/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj b/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
index cf622f4..dbb20f1 100644
--- a/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
+++ b/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
@@ -9,7 +9,6 @@
true
-