-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (37 loc) · 1.31 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
name: 'Deploy: Production'
on:
push:
tags:
- 'v*'
env:
PACKAGE_OUTPUT: ${{ github.workspace }}/package
jobs:
deploy:
runs-on: ubuntu-latest
environment: Production
steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: .NET Setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '6.x'
includePrerelease: true
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
- name: Restoring
run: dotnet restore --verbosity normal
- name: Building
run: dotnet build --configuration Release --no-restore --verbosity normal
- name: Testing
run: dotnet test --configuration Release --no-restore --no-build --verbosity normal
- name: Packing (w/ Symbols)
run: dotnet pack --configuration Release --no-restore --no-build --verbosity normal --output ${{ env.PACKAGE_OUTPUT }} -p:Version=${{ env.GitVersion_SemVer }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
- name: Pushing
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT }}/*.nupkg -k ${{ secrets.REPOSITORY_KEY }} -s ${{ secrets.REPOSITORY_SOURCE }}