50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Publish Host (Avalonia)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "host-v*"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish ${{ matrix.rid }}
|
|
runs-on: [self-hosted, Linux, X64, co-server]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
rid: [win-x64, linux-x64]
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9
|
|
env:
|
|
DOTNET_INSTALL_DIR: ${{ runner.tool_cache }}/dotnet
|
|
with:
|
|
dotnet-version: "8.0.x"
|
|
|
|
- name: Publish single-file self-contained
|
|
run: >
|
|
dotnet publish host/CommonwealthOnline.Host.csproj
|
|
-c Release
|
|
-r ${{ matrix.rid }}
|
|
--self-contained true
|
|
-p:PublishSingleFile=true
|
|
-p:IncludeNativeLibrariesForSelfExtract=true
|
|
-p:DebugType=none
|
|
-o out/${{ matrix.rid }}
|
|
--nologo
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
with:
|
|
name: CommonwealthOnline.Host-${{ matrix.rid }}
|
|
path: out/${{ matrix.rid }}/
|
|
if-no-files-found: error
|
|
retention-days: 7
|