feat: ready for 11.1.0.

This commit is contained in:
Zhang Dian
2024-07-03 23:39:17 +08:00
parent 678bcdef9c
commit b487dc9307
14 changed files with 70 additions and 41 deletions

View File

@@ -2,12 +2,12 @@ name: Deploy to GitHub Pages
env:
PROJECT_PATH: demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj
OUTPUT_PATH: demo/Ursa.Demo.Browser/bin/Release/net7.0/browser-wasm/AppBundle
OUTPUT_PATH: demo/Ursa.Demo.Browser/bin/Release/net8.0-browser/publish/wwwroot
on:
push:
branches: [ "deploy" ]
branches: [ "action/deploy" ]
pull_request:
branches: [ "deploy" ]
branches: [ "action/deploy" ]
jobs:
deploy-to-github-pages:
@@ -16,19 +16,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup .NET 7
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.405
dotnet-version: 8.0.x
- name: Install wasm-tools
run: dotnet workload install wasm-tools wasm-tools-net7
- name: Install DotNetCompress
run: dotnet tool install --global DotNetCompress --version 3.0.0 --no-cache
run: dotnet workload install wasm-tools
- name: Publish .NET Project
run: dotnet publish $PROJECT_PATH -c Release -o release --nologo
run: dotnet publish $PROJECT_PATH -c Release --nologo
- name: Change base-tag in index.html
run: sed -i 's/<base href="\/" \/>/<base href="\/Ursa.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html
@@ -36,12 +33,6 @@ jobs:
- name: copy index.html to 404.html
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
- name: Compress Output using Brotli
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format br --threads 4
- name: Compress Output using GZip
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4
- name: Add .nojekyll file
run: touch $OUTPUT_PATH/.nojekyll

49
.github/workflows/pack.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: Pack
on:
push:
branches: [ "action/pack" ]
pull_request:
branches: [ "action/pack" ]
jobs:
nuget_desktop:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Nuget
run: dotnet pack ./src/Ursa -o ./nugets
- name: Desktop
run: dotnet publish ./demo/Ursa.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: nuget_desktop
path: |
./nugets
./**/publish/*.exe
android:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: CD Android
run: cd ./demo/Ursa.Demo.Android
- name: Restore Dependencies
run: dotnet restore
- name: Build
run: dotnet publish ./demo/Ursa.Demo.Android -c Release -f net8.0-android --no-restore
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: android
path: ./**/publish/*Signed.apk