-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 1.15 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
name: Deploy to NuGet
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test -p:CollectCoverage=true -p:CoverletOutput=TestResults/ -p:CoverletOutputFormat=opencover --configuration Release --no-build --verbosity normal CatConsult.PaginationHelper.Tests/
- name: Create Test Coverage Badge
uses: simon-k/[email protected]
id: create_coverage_badge
with:
label: Unit Test Coverage
color: brightgreen
path: CatConsult.PaginationHelper.Tests/TestResults/coverage.opencover.xml
gist-filename: code-coverage.json
gist-id: 33a4dd1f54e8b9cf42cb49328e0c282a
gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }}
- name: Deploy
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_DEPLOY_KEY}}