-
Notifications
You must be signed in to change notification settings - Fork 11
141 lines (106 loc) · 3.89 KB
/
PushNuget-3x.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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Push to Nuget (3x)
on:
push:
branches: [ 3x ]
paths-ignore:
- 'coverage/**'
- '*.md'
- '*.txt'
env:
dotnet-version: 3.1.201
source-url: "https://api.nuget.org/v3/index.json"
jobs:
build-netcore:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Enable GitHub packages feed
run: dotnet nuget enable source github
- name: Build
run: pwsh ./build.ps1
env:
NUGET_USERNAME: DynamicsValue
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
build-windows:
strategy:
fail-fast: false
matrix:
configuration: ['FAKE_XRM_EASY_9', 'FAKE_XRM_EASY_365', 'FAKE_XRM_EASY_2016','FAKE_XRM_EASY_2015','FAKE_XRM_EASY_2013']
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Build
run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
sonar:
needs: build-netcore
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Enable GitHub packages feed
run: dotnet nuget enable source github
- name: Quality Gate
uses: DynamicsValue/dotnet-sonarscanner@v2.3
with:
buildCommand: dotnet build . --configuration 'FAKE_XRM_EASY_9' --framework netcoreapp3.1
testCommand: dotnet test . --configuration 'FAKE_XRM_EASY_9' --framework netcoreapp3.1 --verbosity normal --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage
projectKey: ${{ secrets.SONAR_PROJECT_KEY }}
projectName: fake-xrm-easy
sonarOrganisation: dynamicsvalue
beginArguments: >
/d:sonar.verbose="true"
/d:sonar.qualitygate.wait="true"
/d:sonar.cs.opencover.reportsPaths='"coverage/**/coverage.opencover.xml"'
/d:sonar.coverage.exclusions='"tests/**/**"'
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_USERNAME: DynamicsValue
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
pack-push:
needs: [build-netcore, build-windows, sonar]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Build
run: pwsh ./build.ps1 -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
- name: Pack
run: pwsh ./pack-src.ps1 -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
- name: Push Src
run: nuget.exe push .\nupkgs\FakeXrmEasy.Core.*.nupkg -Source ${{ env.source-url }} -ApiKey ${{ secrets.NUGET_API_KEY }}