-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (65 loc) · 2.09 KB
/
dotnet-desktop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: .NET Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
# 安装 .NET Core
- name: Install .NET Core
uses: actions/[email protected]
with:
dotnet-version: '6.0.x'
# # 安装 NuGet
# - name: Setup NuGet
# uses: NuGet/[email protected]
# with:
# nuget-version: '5.x'
# # 还原 NuGet 包
# - name: NuGet restore
# run: nuget restore
# 添加 MSBuild.exe 到环境变量: https://github.com/microsoft/setup-msbuild
- name: Add msbuild to PATH
uses: microsoft/[email protected]
# 编译整个项目
- name: Build the solution
run: |
msbuild -t:restore /p:GitFlow="Github Action"
msbuild /p:Configuration=Release /p:Platform="Any CPU" /p:GitFlow="Github Action"
env:
Configuration: ${{ matrix.configuration }}
# - name: Build the solution (x64)
# run: |
# msbuild -t:restore /p:GitFlow="Github Action"
# msbuild /p:Configuration=Release /p:Platform="x64" /p:GitFlow="Github Action"
# env:
# Configuration: ${{ matrix.configuration }}
# - name: Build the solution (ARM64)
# run: |
# msbuild -t:restore /p:GitFlow="Github Action"
# msbuild /p:Configuration=Release /p:Platform="ARM64" /p:GitFlow="Github Action"
# env:
# Configuration: ${{ matrix.configuration }}
# 上传编译成品
- name: Upload to artifact
uses: actions/upload-artifact@main
with:
name: Date-Countdown
path: DateCountdown/bin/Release
# - name: Upload to artifact (x64)
# uses: actions/upload-artifact@main
# with:
# name: Date-Countdown-x64
# path: DateCountdown/bin/x64/Release
# - name: Upload to artifact (ARM64)
# uses: actions/upload-artifact@main
# with:
# name: Date-Countdown-ARM64
# path: DateCountdown/bin/ARM64/Release