-
-
Notifications
You must be signed in to change notification settings - Fork 52
42 lines (34 loc) · 1.03 KB
/
main.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
name: Publish SearchExtensions package to NuGet
on:
push:
branches:
- gha-nuget-test
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Restore dependencies
run: dotnet restore
build:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Build
run: dotnet build -c Release --no-restore --verbosity minimal
working-directory: NinjaNye.SearchExtensions
test:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Unit Tests
run: dotnet test --no-restore --verbosity minimal
working-directory: NinjaNye.SearchExtensions.Tests
# - name: Pack
# run: dotnet pack --configuration Release --no-build --output ../../nupkgs
#
# - name: Push to NuGet
# run: dotnet nuget push ../../nupkgs/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate
# if: startsWith(github.ref, 'refs/tags/v')