-
Notifications
You must be signed in to change notification settings - Fork 19
50 lines (45 loc) · 1.68 KB
/
dotnet_test.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Build and Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
setup:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Add package source
run: dotnet nuget add source ${{ github.workspace }}/Assemblies
- name: Restore packages
run: dotnet restore /property:Configuration="Debug vendor unsupported"
- name: Build
run: dotnet build --no-restore --configuration "Debug vendor unsupported" /property:BclBuildImported=Ignore
test:
needs: setup
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Test
run: dotnet test --no-build --verbosity normal --configuration "Debug vendor unsupported"
publish:
if: ${{ github.event_name == 'push' }}
needs: test
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Add package source
run: dotnet nuget add source ${{ github.workspace }}/Assemblies
- name: Restore packages
run: dotnet restore /property:Configuration="Release vendor unsupported"
- name: Publish
run: dotnet publish src/MSDIAL5/MsdialGuiApp/MsdialGuiApp.csproj -p:PublishProfile=FolderProfile -o artifact --configuration "Release vendor unsupported"
- name: Copy licenses
run: Copy-Item -Path LGPL.txt,THIRD-PARTY-LICENSE-README.md,README.md -Destination artifact
- name: Upload
uses: actions/upload-artifact@v3.1.2
with:
name: MSDIAL
path: artifact