File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,8 +128,21 @@ jobs:
128128 if (-not [string]::IsNullOrWhiteSpace("${{ secrets.LAF_PUBLISHER_ID }}")) {
129129 echo "LAF_PUBLISHER_ID=${{ secrets.LAF_PUBLISHER_ID }}" >> $env:GITHUB_ENV
130130 }
131+ - name : Create ephemeral nuget config from template
132+ shell : pwsh
133+ run : |
134+ $templatePath = "${{ github.workspace }}\nuget.config.template"
135+ $configPath = "$env:RUNNER_TEMP\nuget.config"
136+
137+ if (-not (Test-Path $templatePath)) {
138+ Write-Error "Template file not found: $templatePath"
139+ exit 1
140+ }
141+
142+ Copy-Item -Path $templatePath -Destination $configPath -Force
143+ echo "EPHEMERAL_NUGET_CONFIG=$configPath" >> $env:GITHUB_ENV
131144 - name : Restore dependencies
132- run : dotnet restore AIDevGallery.sln -r win-${{ matrix.dotnet-arch }} /p:Configuration=${{ matrix.dotnet-configuration }} /p:Platform=${{ matrix.dotnet-arch }} /p:PublishReadyToRun=true /p:SelfContainedIfPreviewWASDK=true
145+ run : dotnet restore AIDevGallery.sln -r win-${{ matrix.dotnet-arch }} /p:Configuration=${{ matrix.dotnet-configuration }} /p:Platform=${{ matrix.dotnet-arch }} /p:PublishReadyToRun=true /p:SelfContainedIfPreviewWASDK=true --configfile "${{ env.EPHEMERAL_NUGET_CONFIG }}"
133146 - name : Build
134147 run : |
135148 dotnet build AIDevGallery.Utils --no-restore /p:Configuration=${{ matrix.dotnet-configuration }} /p:LafToken="${{ env.LAF_TOKEN }}" /p:LafPublisherId="${{ env.LAF_PUBLISHER_ID }}"
Original file line number Diff line number Diff line change @@ -398,4 +398,7 @@ FodyWeavers.xsd
398398* .sln.iml
399399
400400# macOS
401- .DS_Store
401+ .DS_Store
402+
403+ # Local NuGet config (for development, to avoid SSCA compliance issues in ADO)
404+ nuget.config
Original file line number Diff line number Diff line change 22 <ItemGroup >
33 <PackageReference Include =" StyleCop.Analyzers" PrivateAssets =" All" />
44 </ItemGroup >
5+
6+ <!-- Auto-create nuget.config from template for local development -->
7+ <Target Name =" EnsureNuGetConfig" BeforeTargets =" CollectPackageReferences;Restore" >
8+ <PropertyGroup >
9+ <NuGetConfigTemplate >$(MSBuildThisFileDirectory)nuget.config.template</NuGetConfigTemplate >
10+ <NuGetConfigTarget >$(MSBuildThisFileDirectory)nuget.config</NuGetConfigTarget >
11+ </PropertyGroup >
12+ <Message Text =" Checking for nuget.config..." Importance =" low" />
13+ <Copy SourceFiles =" $(NuGetConfigTemplate)"
14+ DestinationFiles =" $(NuGetConfigTarget)"
15+ Condition =" Exists('$(NuGetConfigTemplate)') And !Exists('$(NuGetConfigTarget)')"
16+ SkipUnchangedFiles =" true" >
17+ <Output TaskParameter =" CopiedFiles" ItemName =" NuGetConfigCreated" />
18+ </Copy >
19+ <Message Text =" Created nuget.config from template for local development"
20+ Importance =" high"
21+ Condition =" '@(NuGetConfigCreated)' != ''" />
22+ </Target >
523</Project >
Original file line number Diff line number Diff line change 1- <?xml version =" 1.0" encoding =" utf-8" ?>
1+ <?xml version =" 1.0" encoding =" utf-8" ?>
22<configuration >
33 <packageSources >
44 <clear />
1313 <package pattern =" *Foundry*" />
1414 </packageSource >
1515 </packageSourceMapping >
16- </configuration >
16+ </configuration >
You can’t perform that action at this time.
0 commit comments