-
-
Notifications
You must be signed in to change notification settings - Fork 6
29 lines (27 loc) · 797 Bytes
/
build.yml
File metadata and controls
29 lines (27 loc) · 797 Bytes
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
name: Build master
on:
push:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
9.0.x
8.0.x
- name: Restore dependencies
run: dotnet tool restore; dotnet restore
- name: Build and test
run: |
dotnet build --no-restore
dotnet test --no-build --verbosity normal
- name : Pack and Publish if tag present
if: startsWith(github.ref, 'refs/tags/v')
run: |
dotnet pack -c Release -o nuget-packages
dotnet nuget push nuget-packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate