-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1.09 KB
/
master-release-pipeline.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
name: Nuget Push
env:
NUGET_FEED: https://api.nuget.org/v3/index.json
NUGET_KEY: ${{ secrets.NUGET_KEY }}
on:
workflow_dispatch:
pull_request:
branches: [ main ]
types: [ closed ]
jobs:
build-test-pack-push:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src/Serilog.Enrichers.MessageTemplate/
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: |
cd ../../test/Serilog.Enrichers.MessageTemplate.Tests/
dotnet test --verbosity normal
- name: Pack
run: dotnet pack -v normal -c Release --no-build --no-restore
- name: Nuget Push
run: dotnet nuget push ./nupkg/Serilog.Enrichers.MessageTemplate*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY