Skip to content

Commit 1af6e52

Browse files
authored
Create dotnet-desktop.yml (#1)
1 parent 7a49c74 commit 1af6e52

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
push:
3+
branches: [ main ]
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
9+
build:
10+
11+
strategy:
12+
matrix:
13+
configuration: [Debug, Release]
14+
15+
runs-on: windows-latest # For a list of available runner types, refer to
16+
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
17+
18+
env:
19+
Solution_Name: src/LoopbackDataProvider.sln # Replace with your solution name, i.e. MyWpfApp.sln.
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 0
26+
27+
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
28+
- name: Setup MSBuild.exe
29+
uses: microsoft/[email protected]
30+
31+
# # Execute all unit tests in the solution
32+
# - name: Execute unit tests
33+
# run: dotnet test
34+
35+
- name: Restore the application
36+
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
37+
env:
38+
Configuration: ${{ matrix.configuration }}
39+
40+
- name: Build the application
41+
run: msbuild $env:Solution_Name /t:Build /p:Configuration=$env:Configuration
42+
env:
43+
Configuration: ${{ matrix.configuration }}
44+
45+
- name: Upload build artifacts
46+
uses: actions/upload-artifact@v2
47+
with:
48+
name: bin
49+
path: src/bin/${{ matrix.configuration }}

0 commit comments

Comments
 (0)