Merge pull request #310 from irihitech/action/config
Reset github action branches.
This commit is contained in:
commit
4b7674d7e2
14
.github/workflows/Pack.yml
vendored
14
.github/workflows/Pack.yml
vendored
@ -2,16 +2,16 @@ name: Pack
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "release" ]
|
branches: [ "action/pack" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "release" ]
|
branches: [ "action/pack" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
nuget_desktop:
|
nuget_desktop:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Nuget Semi.Avalonia
|
- name: Nuget Semi.Avalonia
|
||||||
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
|
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
|
||||||
@ -28,8 +28,8 @@ jobs:
|
|||||||
- name: Desktop
|
- name: Desktop
|
||||||
run: dotnet publish ./demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
|
run: dotnet publish ./demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: nuget_desktop
|
name: nuget_desktop
|
||||||
path: |
|
path: |
|
||||||
@ -40,7 +40,7 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: CD Android
|
- name: CD Android
|
||||||
run: cd ./demo/Semi.Avalonia.Demo.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
|
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net7.0-android --no-restore
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: android
|
name: android
|
||||||
path: ./**/publish/*Signed.apk
|
path: ./**/publish/*Signed.apk
|
||||||
|
60
.github/workflows/deploy.yml
vendored
60
.github/workflows/deploy.yml
vendored
@ -5,49 +5,49 @@ env:
|
|||||||
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net7.0/browser-wasm/AppBundle
|
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net7.0/browser-wasm/AppBundle
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "deploy" ]
|
branches: [ "action/deploy" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "deploy" ]
|
branches: [ "action/deploy" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-to-github-pages:
|
deploy-to-github-pages:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Setup .NET 7
|
- name: Setup .NET 7
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 7.0.405
|
dotnet-version: 7.0.405
|
||||||
|
|
||||||
- name: Install wasm-tools
|
- name: Install wasm-tools
|
||||||
run: dotnet workload install wasm-tools wasm-tools-net7
|
run: dotnet workload install wasm-tools wasm-tools-net7
|
||||||
|
|
||||||
- name: Install DotNetCompress
|
- name: Install DotNetCompress
|
||||||
run: dotnet tool install --global DotNetCompress --version 3.0.0 --no-cache
|
run: dotnet tool install --global DotNetCompress --version 3.0.0 --no-cache
|
||||||
|
|
||||||
- name: Publish .NET Project
|
- name: Publish .NET Project
|
||||||
run: dotnet publish $PROJECT_PATH -c Release -o release --nologo
|
run: dotnet publish $PROJECT_PATH -c Release -o release --nologo
|
||||||
|
|
||||||
- name: Change base-tag in index.html
|
- name: Change base-tag in index.html
|
||||||
run: sed -i 's/<base href="\/" \/>/<base href="\/Semi.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html
|
run: sed -i 's/<base href="\/" \/>/<base href="\/Semi.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html
|
||||||
|
|
||||||
- name: copy index.html to 404.html
|
- name: copy index.html to 404.html
|
||||||
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
|
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
|
||||||
|
|
||||||
- name: Compress Output using Brotli
|
- name: Compress Output using Brotli
|
||||||
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format br --threads 4
|
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format br --threads 4
|
||||||
|
|
||||||
- name: Compress Output using GZip
|
- name: Compress Output using GZip
|
||||||
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4
|
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4
|
||||||
|
|
||||||
- name: Add .nojekyll file
|
- name: Add .nojekyll file
|
||||||
run: touch $OUTPUT_PATH/.nojekyll
|
run: touch $OUTPUT_PATH/.nojekyll
|
||||||
|
|
||||||
- name: Commit wwwroot to GitHub Pages
|
- name: Commit wwwroot to GitHub Pages
|
||||||
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
BRANCH: gh-pages
|
BRANCH: gh-pages
|
||||||
FOLDER: ${{ env.OUTPUT_PATH }}
|
FOLDER: ${{ env.OUTPUT_PATH }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user