-
Notifications
You must be signed in to change notification settings - Fork 20
44 lines (38 loc) · 1.5 KB
/
dotnet.yml
File metadata and controls
44 lines (38 loc) · 1.5 KB
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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
defaults:
run:
working-directory: ./Project
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
#- name: Restore dependencies
#run: dotnet restore SharpLibHid.sln
# We needed to separately build each target and configuration combinations
# Not sure if there is build everything command we could use instead
- name: Build debug x86
run: dotnet build SharpLibHid.sln -c Debug /p:Platform=x86
- name: Build release x86
run: dotnet build SharpLibHid.sln -c Release /p:Platform=x86
- name: Build debug x64
run: dotnet build SharpLibHid.sln -c Debug /p:Platform=x64
- name: Build release x64
run: dotnet build SharpLibHid.sln -c Release /p:Platform=x64
- name: Test
run: dotnet test SharpLibHid.sln --no-build --verbosity normal
- name: Publish Nuget x86
run: dotnet nuget push './Hid/bin/x86/Release/Slions.SharpLib.Hid-x86.1.6.1.nupkg' --skip-duplicate -k ${{ secrets.NUGET_CREATE_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Publish Nuget x64
run: dotnet nuget push './Hid/bin/x64/Release/Slions.SharpLib.Hid-x64.1.6.1.nupkg' --skip-duplicate -k ${{ secrets.NUGET_CREATE_TOKEN }} --source https://api.nuget.org/v3/index.json
#env:
# NUGET_APIKEY: ${{ secrets.NUGET_TOKEN }}