-
Notifications
You must be signed in to change notification settings - Fork 6
75 lines (62 loc) · 1.85 KB
/
canarybuilds.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Canary Builds
on:
push:
branches:
- master
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
ContinuousIntegrationBuild: true
BuildType: canary
jobs:
build:
name: Build & Test
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Setup Dotnet for use with actions
uses: actions/setup-dotnet@v1
- name: Test
run: dotnet test -c Release -p:EnableCoverage=true
- name: Upload Code Coverage
uses: codecov/codecov-action@v2
with:
files: out/coverage/**/*.opencover.xml
if: ${{ always() }}
- name: Upload TestResults
uses: actions/upload-artifact@v2
with:
name: TestResults & Coverage
path: |
out/coverage/
out/testresults/*.trx
if: ${{ always() }}
- name: Pack
run: dotnet pack -c Release
- name: Upload Packages
uses: actions/upload-artifact@v2
with:
name: packages
path: out/packages/*.nupkg
deploy-to-gpr:
name: Deploy to GPR
needs: [ build ]
runs-on: ubuntu-latest
environment:
name: GPR
url: https://github.com/MeikTranel/NXPorts/packages
env:
GPR_REPOURI: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
steps:
- uses: actions/checkout@v1
- uses: actions/[email protected]
name: Download Packages from build job
with:
name: packages
path: out/packages/
- name: Setup Dotnet for use with actions
uses: actions/setup-dotnet@v1
- name: Publish CI Package to GitHub Package Registry
run: |
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name GPR "${{env.GPR_REPOURI}}"
dotnet nuget push "*.nupkg" --source GPR
working-directory: out/packages/