Skip to content

Commit e0d8b1b

Browse files
authored
Create msbuild.yml
1 parent ee09bc1 commit e0d8b1b

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/msbuild.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: MSBuild
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
env:
8+
# Path to the solution file relative to the root of the project.
9+
SOLUTION_FILE_PATH: .
10+
11+
# Configuration type to build.
12+
# You can convert this to a build matrix if you need coverage of multiple configuration types.
13+
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
14+
BUILD_CONFIGURATION: Release
15+
16+
permissions: write-all
17+
18+
jobs:
19+
build:
20+
runs-on: windows-latest
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
26+
- name: Add MSBuild to PATH
27+
uses: microsoft/setup-msbuild@v1.0.2
28+
29+
- name: Restore NuGet packages
30+
working-directory: ${{env.GITHUB_WORKSPACE}}
31+
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
32+
33+
- name: Build
34+
working-directory: ${{env.GITHUB_WORKSPACE}}
35+
# Add additional options to the MSBuild command line here (like platform or verbosity level).
36+
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
37+
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:DebugType=None ${{env.SOLUTION_FILE_PATH}}
38+
39+
- name: Zip
40+
uses: vimtor/action-zip@v1
41+
with:
42+
files: x64/Release/
43+
dest: Artifacts.zip
44+
45+
- name: Upload
46+
uses: actions/upload-artifact@v3.1.0
47+
with:
48+
name: Artifacts
49+
path: Artifacts.zip
50+
51+
- name: Release
52+
if: startsWith(github.ref, 'refs/tags/')
53+
uses: softprops/action-gh-release@v0.1.14
54+
with:
55+
files: Artifacts.zip

0 commit comments

Comments
 (0)