-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (45 loc) · 1.43 KB
/
deploy.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Publish nuget
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
Deploy:
runs-on: ubuntu-20.04
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.5.0'
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0
env:
DOTNET_ROLL_FORWARD: Major
- name: Echo version
run: echo ${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Setup .NET Core SDK '7.x.x'
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.x.x'
include-prerelease: true
- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1
with:
version: ${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Display dotnet version
run: dotnet --version
- name: Install Dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Publish the package
run: dotnet nuget push **/*.nupkg -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate