-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (47 loc) · 2.06 KB
/
build-check.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
name: Build Check
# 在 on 字段下列举触发条件(事件),可以有多种
on:
# 手动使用 Github WebUI 触发
workflow_dispatch:
# 仓库收到 Push 时触发
push:
branches:
- main
# 仓库收到 pull_request 时触发
pull_request:
branches:
- main
jobs:
build:
# strategy:
# matrix:
# configuration: Release
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
# env:
# Solution_Name: SrcGit.sln # Replace with your solution name, i.e. MyWpfApp.sln.
# Wpf_Project_Path: src\SrcGit.csproj
# # Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
# # Wap_Project_Directory: your-wap-project-directory-name # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package.
# # Wap_Project_Path: your-wap-project-path # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj.
# Actions_Allow_Unsecure_Commands: true # Allows AddPAth and SetEnv commands
steps:
- name: Checkout
uses: actions/checkout@v3
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Build publish
run: |
dotnet publish src/SrcGit.csproj --nologo -c Release -r win-x64 -f net6.0-windows -p:PublishSingleFile=true --no-self-contained -o publish
# https://github.com/marketplace/actions/upload-a-build-artifact
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: SrcGit
path: publish/SrcGit.exe