-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (31 loc) · 1.06 KB
/
publish.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
name: CI
on:
push:
branches:
- master
jobs:
build:
env:
DOTNET_NOLOGO: 'true'
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.x
6.x
7.x
source-url: https://nuget.pkg.github.com/jasonlandbridge/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_API_KEY}}
- name: Run tests
run: dotnet test /p:Configuration=Release --no-restore --no-build --verbosity normal
- name: Create the package
run: dotnet pack --configuration Release ./src/Serilog.Sinks.Console.LogThemes/Serilog.Sinks.Console.LogThemes.csproj
- name: Publish the package to nuget.org
run: dotnet nuget push ./src/Serilog.Sinks.Console.LogThemes/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN --skip-duplicate -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}