misc: reset branches.

This commit is contained in:
Zhang Dian 2024-03-12 15:34:41 +08:00
parent 3d267139fe
commit 166490195f
2 changed files with 37 additions and 37 deletions

View File

@ -2,16 +2,16 @@ name: Pack
on:
push:
branches: [ "release" ]
branches: [ "action/pack" ]
pull_request:
branches: [ "release" ]
branches: [ "action/pack" ]
jobs:
nuget_desktop:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
- name: Nuget Semi.Avalonia
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
@ -28,8 +28,8 @@ jobs:
- name: Desktop
run: dotnet publish ./demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
- name: Upload
uses: actions/upload-artifact@v3.1.2
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: nuget_desktop
path: |
@ -40,7 +40,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
- name: CD Android
run: cd ./demo/Semi.Avalonia.Demo.Android
@ -52,7 +52,7 @@ jobs:
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net7.0-android --no-restore
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4.3.1
with:
name: android
path: ./**/publish/*Signed.apk

View File

@ -5,49 +5,49 @@ env:
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net7.0/browser-wasm/AppBundle
on:
push:
branches: [ "deploy" ]
branches: [ "action/deploy" ]
pull_request:
branches: [ "deploy" ]
branches: [ "action/deploy" ]
jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup .NET 7
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.405
- name: Setup .NET 7
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.405
- name: Install wasm-tools
run: dotnet workload install wasm-tools wasm-tools-net7
- 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
- name: Install DotNetCompress
run: dotnet tool install --global DotNetCompress --version 3.0.0 --no-cache
- name: Publish .NET Project
run: dotnet publish $PROJECT_PATH -c Release -o release --nologo
- name: Publish .NET Project
run: dotnet publish $PROJECT_PATH -c Release -o release --nologo
- name: Change base-tag in index.html
run: sed -i 's/<base href="\/" \/>/<base href="\/Semi.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html
- name: Change base-tag in index.html
run: sed -i 's/<base href="\/" \/>/<base href="\/Semi.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html
- name: copy index.html to 404.html
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
- 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 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: 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
- name: Add .nojekyll file
run: touch $OUTPUT_PATH/.nojekyll
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ${{ env.OUTPUT_PATH }}
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ${{ env.OUTPUT_PATH }}