-
Notifications
You must be signed in to change notification settings - Fork 9
38 lines (28 loc) · 1007 Bytes
/
cd_nuget.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
name: Publish to NuGet
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x'
- name: Create Strong Name Keypair
run: echo "${{ secrets.SNK_BASE64 }}" | base64 --decode > sgKeyIPinfoStrongName.snk
- name: Restore dependencies
run: dotnet restore
- name: Test
run: dotnet test
env:
IPINFO_TOKEN: ${{ secrets.IPINFO_TOKEN }}
- name: Build
run: dotnet build --configuration Release /p:AssemblyOriginatorKeyFile=sgKeyIPinfoStrongName.snk
- name: Pack
run: dotnet pack --configuration Release --output nupkgs /p:AssemblyOriginatorKeyFile=sgKeyIPinfoStrongName.snk
- name: Publish to NuGet
run: dotnet nuget push nupkgs/IPinfo.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json