-
Notifications
You must be signed in to change notification settings - Fork 7
34 lines (31 loc) · 928 Bytes
/
build.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
nuget-version: '6.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack & Publish
run: |
dotnet pack --version-suffix "build${{ github.run_number }}" -c Release .\SPB\SPB.csproj -o .
$file_to_publish = Get-ChildItem -Path $dir -Filter *.nupkg | Select -First 1
echo $file_to_publish
nuget push $file_to_publish -Source https://api.nuget.org/v3/index.json