Skip to content

Commit 883f326

Browse files
authored
Optimize NuGet package restore (#1605)
* Optimize NuGet package restore Don't query for all packages in all feeds * Trigger component builds on nuget.config change
1 parent 2f99497 commit 883f326

File tree

8 files changed

+19
-3
lines changed

8 files changed

+19
-3
lines changed

.github/workflows/component-common.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- stylecop.json
99
- '*.props'
1010
- '*.ruleset'
11+
- nuget.config
1112
- .config/dotnet-tools.json
1213
- .github/workflows/component-shared-workflow.yml
1314
- .github/workflows/component-common.yml

.github/workflows/component-configuration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- stylecop.json
99
- '*.props'
1010
- '*.ruleset'
11+
- nuget.config
1112
- .config/dotnet-tools.json
1213
- .github/workflows/component-shared-workflow.yml
1314
- .github/workflows/component-configuration.yml

.github/workflows/component-connectors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- stylecop.json
99
- '*.props'
1010
- '*.ruleset'
11+
- nuget.config
1112
- .config/dotnet-tools.json
1213
- .github/workflows/component-shared-workflow.yml
1314
- .github/workflows/component-connectors.yml

.github/workflows/component-discovery.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- stylecop.json
99
- '*.props'
1010
- '*.ruleset'
11+
- nuget.config
1112
- .config/dotnet-tools.json
1213
- .github/workflows/component-shared-workflow.yml
1314
- .github/workflows/component-discovery.yml

.github/workflows/component-logging.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- stylecop.json
99
- '*.props'
1010
- '*.ruleset'
11+
- nuget.config
1112
- .config/dotnet-tools.json
1213
- .github/workflows/component-shared-workflow.yml
1314
- .github/workflows/component-logging.yml

.github/workflows/component-management.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- stylecop.json
99
- '*.props'
1010
- '*.ruleset'
11+
- nuget.config
1112
- .config/dotnet-tools.json
1213
- .github/workflows/component-shared-workflow.yml
1314
- .github/workflows/component-management.yml

.github/workflows/component-security.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- stylecop.json
99
- '*.props'
1010
- '*.ruleset'
11+
- nuget.config
1112
- .config/dotnet-tools.json
1213
- .github/workflows/component-shared-workflow.yml
1314
- .github/workflows/component-security.yml

nuget.config

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<!-- Required for .NET Aspire Configuration Schema Generator, which needs System.CommandLine. -->
4+
<clear />
5+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
56
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
6-
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
77
</packageSources>
8+
<packageSourceMapping>
9+
<packageSource key="nuget.org">
10+
<package pattern="*" />
11+
</packageSource>
12+
<packageSource key="dotnet-libraries">
13+
<!-- Required for .NET Aspire Configuration Schema Generator, which needs System.CommandLine. -->
14+
<package pattern="System.CommandLine" />
15+
</packageSource>
16+
</packageSourceMapping>
817
</configuration>

0 commit comments

Comments
 (0)