-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (36 loc) · 923 Bytes
/
cd.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
name: CD
on:
push:
tags:
- '*'
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Build
run: dotnet build -c Release src/NetUlid.sln
- name: Create NuGet packages
run: dotnet pack -o pkg --no-build -c Release src/NetUlid.sln
- name: Upload NuGet packages
uses: actions/upload-artifact@v2
with:
name: packages
path: pkg
publish:
name: Publish
runs-on: ubuntu-20.04
needs: build
steps:
- name: Download packages
uses: actions/download-artifact@v2
with:
name: packages
- name: Publish NuGet packages
run: dotnet nuget push '*.nupkg' -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_KEY }}" --skip-duplicate