-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (88 loc) · 2.51 KB
/
Copy pathrelease.yml
File metadata and controls
104 lines (88 loc) · 2.51 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Release
on:
push:
tags:
- '*.*.*'
env:
DOTNET_NOLOGO: true # Disable the .NET logo in the console output
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience to skip caching NuGet packages and speed up the build
DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry to Microsoft
jobs:
build:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build and Test
run: ./Build.ps1
shell: pwsh
- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/*/coverage.cobertura.xml
badge: true
fail_below_min: false
format: markdown
hide_branch_rate: false
hide_complexity: false
indicators: true
output: both
thresholds: '60 80'
- name: Upload Push script
uses: actions/upload-artifact@v3
with:
name: push-script
path: Push.ps1
- name: Upload Test Report Artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: code-coverage-results.md
- name: Upload Nuget Artifact
uses: actions/upload-artifact@v3
with:
name: release-nuget
path: ./artifacts
deploy-nuget:
runs-on: ubuntu-latest
name: Deploy to NuGet Packages
needs: [build]
steps:
- name: Download push script
uses: actions/download-artifact@v2
with:
name: push-script
- name: Download Test Report Artifact
uses: actions/download-artifact@v2
with:
name: coverage
- name: Download NuGet Artifact
uses: actions/download-artifact@v2
with:
name: release-nuget
path: artifacts
- name: Push to Nuget Pkg GitHub
env:
NUGET_URL: https://api.nuget.org/v3/index.json
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: ./Push.ps1
shell: pwsh
deploy-docs:
name: Deploy Docs
needs: [build, deploy-nuget]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Documentation
uses: nikeee/docfx-action@v1.0.0
with:
args: docs/docfx.json
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_site