-
-
Notifications
You must be signed in to change notification settings - Fork 19
284 lines (256 loc) · 13.7 KB
/
dotnet-core.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
name: .NET Core
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Initial Checkout
uses: actions/checkout@v2.3.3
with:
path: ./NuGetDefense
fetch-depth: 0
- name: Checkout NVD Feed Impoorter
uses: actions/checkout@v2.3.3
with:
repository: digitalcoyote/NuGetDefense.NVD
path: ./NuGetDefense.NVD
- name: Install Dependencies
run: |
dotnet nuget add source "https://nuget.pkg.github.com/digitalcoyote/index.json" --name github --username digitalcoyote --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
dotnet restore ./NuGetDefense.NVD/Src/NuGetDefense.NVD.sln
dotnet restore ./NuGetDefense/Src/NuGetDefense.sln
dotnet tool install Nuke.GlobalTool --global
dotnet tool install GitVersion.Tool --global
- name: Generate VulnerabilityData.bin
run: |
dotnet build ./NuGetDefense.NVD/Src/NuGetDefense.NVD.sln -property:GeneratePackageOnBuild=false --configuration Release -v m
mkdir -p ./NuGetDefense/Src/NuGetDefense/bin/Release/netcoreapp3.1
dotnet ./NuGetDefense.NVD/Src/NVDFeedImporter/bin/Release/netcoreapp3.1/NVDFeedImporter.dll "./NuGetDefense/Src/NuGetDefense/bin/Release/netcoreapp3.1/"
- name: Build NuGetDefense
working-directory: NuGetDefense
run: nuke --root ./
- name: Test
run: dotnet test ./NuGetDefense/Src/NuGetDefense.sln --no-restore --verbosity normal
- name: Publish to GitHub Package Repository
working-directory: ./NuGetDefense/Src/NuGetDefense/bin/Release/
shell: pwsh
run: |
$nupkg = Get-ChildItem -Filter *.nupkg -Name | Select-Object -First 1
&curl -X PUT -u "digitalcoyote:${{ secrets.GITHUB_TOKEN }}" -F package=@"$nupkg" https://nuget.pkg.github.com/digitalcoyote/
Bogus_Net:
needs: Build
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.3
with:
repository: bchavez/Bogus
- name: Install Dependencies
run: |
dotnet restore ./Source/Bogus/Bogus.csproj
dotnet restore ./Source/Bogus.Tests/Bogus.Tests.csproj
dotnet nuget add source "https://nuget.pkg.github.com/digitalcoyote/index.json" --username digitalcoyote --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
dotnet add ./Source/Bogus/Bogus.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./Source/Bogus.Tests/Bogus.Tests.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
- name: Build Bogus
run: dotnet build ./Source/Bogus/Bogus.csproj
- name: Build Bogus.Tests
run: dotnet build ./Source/Bogus.Tests/Bogus.Tests.csproj
GitExtensions:
needs: Build
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.3
with:
repository: gitextensions/gitextensions
submodules: true
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Install Dependencies
shell: pwsh
run: |
dotnet restore ./GitExtensions.sln
dotnet nuget add source "https://nuget.pkg.github.com/digitalcoyote/index.json" --name github --username digitalcoyote --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
'./GitExtensions/GitExtensions.csproj',
'./GitUI/GitUI.csproj',
'./GitCommands/GitCommands.csproj',
'./Plugins/GitUIPluginInterfaces/GitUIPluginInterfaces.csproj',
'./Plugins/Statistics/GitStatistics/GitStatistics.csproj',
'./ResourceManager/ResourceManager.csproj',
'./Plugins/Gource/Gource.csproj',
'./Plugins/DeleteUnusedBranches/DeleteUnusedBranches.csproj',
'./NetSpell.SpellChecker/SpellChecker.csproj',
'./Plugins/Statistics/GitImpact/GitImpact.csproj',
'./Plugins/CreateLocalBranches/CreateLocalBranches.csproj',
'./Plugins/FindLargeFiles/FindLargeFiles.csproj',
'./Plugins/GitHub3/GitHub3.csproj',
'./Plugins/ProxySwitcher/ProxySwitcher.csproj',
'./Plugins/ReleaseNotesGenerator/ReleaseNotesGenerator.csproj',
'./TranslationApp/TranslationApp.csproj',
'./Plugins/BackgroundFetch/BackgroundFetch.csproj',
'./Plugins/AutoCompileSubmodules/AutoCompileSubmodules.csproj',
'./Plugins/GitFlow/GitFlow.csproj',
'./Plugins/BuildServerIntegration/TeamCityIntegration/TeamCityIntegration.csproj',
'./Externals/Git.hub/Git.hub/Git.hub.csproj',
'./Plugins/Bitbucket/Bitbucket.csproj',
'./Plugins/BuildServerIntegration/JenkinsIntegration/JenkinsIntegration.csproj',
'./Plugins/BuildServerIntegration/TfsIntegration/TfsIntegration.csproj',
'./Plugins/BuildServerIntegration/TfsInterop.Vs2012/TfsInterop.Vs2012.csproj',
'./Plugins/BuildServerIntegration/TfsInterop.Vs2013/TfsInterop.Vs2013.csproj',
'./GitExtUtils/GitExtUtils.csproj',
'./Plugins/BuildServerIntegration/TfsInterop.Vs2015/TfsInterop.Vs2015.csproj',
'./Externals/conemu-inside/ConEmuWinForms/ConEmuWinForms.csproj',
'./Plugins/BuildServerIntegration/AppVeyorIntegration/AppVeyorIntegration.csproj',
'./UnitTests/GitCommands.Tests/GitCommands.Tests.csproj',
'./UnitTests/GitUI.Tests/GitUI.Tests.csproj',
'./UnitTests/Plugins/ReleaseNotesGenerator.Tests/ReleaseNotesGenerator.Tests.csproj',
'./UnitTests/ResourceManager.Tests/ResourceManager.Tests.csproj',
'./Plugins/JiraCommitHintPlugin/JiraCommitHintPlugin.csproj',
'./UnitTests/CommonTestUtils/CommonTestUtils.csproj',
'./Plugins/BuildServerIntegration/AzureDevOpsIntegration/AzureDevOpsIntegration.csproj',
'./UnitTests/GitExtUtils.Tests/GitExtUtils.Tests.csproj',
'./Externals/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj',
'./UnitTests/Plugins/GitUIPluginInterfaces.Tests/GitUIPluginInterfaces.Tests.csproj',
'./UnitTests/Plugins/BuildServerIntegration/AzureDevOpsIntegration.Tests/AzureDevOpsIntegration.Tests.csproj',
'./UnitTests/Plugins/BuildServerIntegration/AppVeyorIntegration.Tests/AppVeyorIntegration.Tests.csproj',
'./UnitTests/Plugins/DeleteUnusedBranches.Tests/DeleteUnusedBranches.Tests.csproj',
'./IntegrationTests/UI.IntegrationTests/UI.IntegrationTests.csproj' |
ForEach-Object -Process {
Set-Content -Path (Join-Path ([System.IO.Path]::GetDirectoryName($_)) "NuGetDefense.json") -Value "{
`"WarnOnly`": false,
`"SensitivePackages`": [
`"Newtonsoft.Json`"
],
`"VulnerabilityReports`": {
`"JsonReportPath`": `"./NuGetDefense.json`"
},
`"Logs`": [
{
`"OutPut`": `"./logs/{project}.NuGetDefense.log`",
`"LogLevel`": `"Information`",
`"RollingInterval`": `"Infinite`"
},
{
`"OutPut`": `"{project}.NuGetDefense.log`",
`"LogLevel`": `"Verbose`",
`"RollingInterval`": `"Day`"
}
],
`"CheckTransitiveDependencies`": true,
`"ErrorSettings`": {
`"ErrorSeverityThreshold`": 5,
`"Cvss3Threshold`": -1,
`"IgnoredPackages`": [],
`"IgnoredCvEs`": [],
`"AllowedPackages`": [],
`"BlockedPackages`": []
},
`"OssIndex`": {
`"Enabled`": true,
`"BreakIfCannotRun`": true,
`"Username`": `"${{ secrets.OSSINDEX_USERNAME }}`",
`"ApiToken`": `"${{ secrets.OSSINDEX_API_TOKEN }}`"
},
`"NVD`": {
`"SelfUpdate`": false,
`"TimeoutInSeconds`": 15,
`"Enabled`": true,
`"BreakIfCannotRun`": true
}
}";
dotnet add $_ package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json;
}
- name: Build GitExtensions
run: MSBuild ./GitExtensions.sln -property:Configuration=Release
NodaTime:
needs: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ]
steps:
- name: Checkout
uses: actions/checkout@v2.3.3
with:
repository: nodatime/nodatime
- name: Install Dependencies
run: |
dotnet restore ./src/NodaTime.sln
dotnet nuget add source "https://nuget.pkg.github.com/digitalcoyote/index.json" --username digitalcoyote --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
dotnet add ./src/NodaTime.Benchmarks/NodaTime.Benchmarks.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.Demo/NodaTime.Demo.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.NzdPrinter/NodaTime.NzdPrinter.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.Test/NodaTime.Test.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.Testing/NodaTime.Testing.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.Tools.Common/NodaTime.Tools.Common.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.Tools.DumpTimeZoneInfo/NodaTime.Tools.DumpTimeZoneInfo.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.Tools.ValidateHistoricalNzd/NodaTime.Tools.ValidateHistoricalNzd.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.TzValidate.NodaDump/NodaTime.TzValidate.NodaDump.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.TzValidate.NzdCompatibility/NodaTime.TzValidate.NzdCompatibility.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.TzdbCompiler.Test/NodaTime.TzdbCompiler.Test.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime.TzdbCompiler/NodaTime.TzdbCompiler.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
dotnet add ./src/NodaTime/NodaTime.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
- name: Build Noda Time
run: dotnet build ./src/NodaTime.sln
NuGetDefenseDocs:
needs: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.3
with:
repository: digitalcoyote/NuGetDefenseDocs
- name: Install Dependencies
shell: pwsh
run: |
dotnet restore ./NuGetDefenseDocs.sln
dotnet nuget add source "https://nuget.pkg.github.com/digitalcoyote/index.json" --name github --username digitalcoyote --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
dotnet add ./NuGetDefenseDocs/NuGetDefenseDocs.csproj package NuGetDefense --version 1.*-* -s https://nuget.pkg.github.com/digitalcoyote/index.json
Set-Content -Path "./NuGetDefenseDocs/NuGetDefense.json" -Value "{
`"WarnOnly`": false,
`"VulnerabilityReports`": {
`"XmlReportPath`": `"./NuGetDefenseDocs/logs/{project}.NuGetDefense.xml`",
`"JsonReportPath`": `"./NuGetDefenseDocs/logs/{project}.NuGetDefense.json`",
`"OutputTextReportPath`": false
},
`"Logs`": [
{
`"OutPut`": `"./NuGetDefenseDocs/logs/{project}.NuGetDefense.log`",
`"LogLevel`": `"Information`",
`"RollingInterval`": `"Infinite`"
},
{
`"OutPut`": `"./NuGetDefenseDocs/logs/{project}.NuGetDefense2.log`",
`"LogLevel`": `"Verbose`",
`"RollingInterval`": `"Day`"
}
],
`"ErrorSettings`": {
`"ErrorSeverityThreshold`": 1,
`"CVSS3Threshold`": -1,
`"IgnoredPackages`": [
{
`"Id`": `"NugetDefense`"
}
],
`"IgnoredCvEs`": [],
`"AllowedPackages`": [],
`"BlockedPackages`": []
},
`"OssIndex`": {
`"Enabled`": true,
`"BreakIfCannotRun`": true
},
`"NVD`": {
`"SelfUpdate`": false,
`"Enabled`": true,
`"BreakIfCannotRun`": true
}
}";
- name: Build NuGetDefenseDocs
run: dotnet build ./NuGetDefenseDocs.sln