Skip to content

Commit 5b24aac

Browse files
Create dotnet-desktop.yml
1 parent 688f73a commit 5b24aac

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
DOTNET_VERSION: 8.0.x
8+
9+
jobs:
10+
11+
build-and-publish:
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, windows-latest, macOS-latest, macos-14]
17+
include:
18+
- os: ubuntu-latest
19+
runtime-identifier: linux-x64
20+
- os: windows-latest
21+
runtime-identifier: win-x64
22+
- os: macOS-latest
23+
runtime-identifier: osx-x64
24+
- os: macos-14
25+
runtime-identifier: osx-arm64
26+
fail-fast: false
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Setup .NET
32+
uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: ${{ env.DOTNET_VERSION }}
35+
36+
- name: Nuget cache
37+
uses: actions/cache@v4
38+
with:
39+
path:
40+
~/.nuget/packages
41+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
42+
restore-keys: |
43+
${{ runner.os }}-nuget-
44+
- name: Build
45+
run: dotnet build -c Release
46+
47+
- name: Publish Engine
48+
run: dotnet publish Interface/Interface.csproj -c Release --runtime ${{ matrix.runtime-identifier }} --self-contained /p:PublishSingleFile=true /p:PublishTrimmed=true -o artifacts/${{ matrix.runtime-identifier }}
49+
50+
- name: Upload Izumi-chan-${{ github.run_number }}-${{ matrix.runtime-identifier }} artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: Izumi-chan-${{ github.run_number }}-${{ matrix.runtime-identifier }}
54+
path: |
55+
artifacts/${{ matrix.runtime-identifier }}/
56+
!artifacts/**/*.pdb
57+
if-no-files-found: error

0 commit comments

Comments
 (0)