2
0

fix(ci): support NuGet package fallback for CI builds
Some checks failed
Build and Test / build (push) Failing after 18s
Build and Test / docker (push) Has been skipped

Add conditional reference logic to use ProjectReference when available locally, falling back to PackageReference in CI environments. Pass NuGet credentials as environment variables during restore to enable authentication for private package feeds.
This commit is contained in:
2026-01-19 11:33:04 -05:00
parent ffb468d3ee
commit e24b23ca3b
3 changed files with 11 additions and 1 deletions

View File

@@ -24,6 +24,9 @@ jobs:
- name: Restore dependencies
run: dotnet restore GitCaddy.AI.sln
env:
NUGET_USER: ${{ github.actor }}
NUGET_TOKEN: ${{ github.token }}
- name: Build
run: dotnet build GitCaddy.AI.sln -c Release --no-restore

View File

@@ -27,6 +27,9 @@ jobs:
- name: Restore dependencies
run: dotnet restore GitCaddy.AI.sln
env:
NUGET_USER: ${{ github.actor }}
NUGET_TOKEN: ${{ github.token }}
- name: Build
run: dotnet build GitCaddy.AI.sln -c Release --no-restore -p:Version=${{ steps.version.outputs.VERSION }}

View File

@@ -27,8 +27,12 @@
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<!-- Use ProjectReference for local dev, PackageReference for CI -->
<ItemGroup Condition="Exists('..\..\..\marketally.aiplugin\MarketAlly.AIPlugin\MarketAlly.AIPlugin.csproj')">
<ProjectReference Include="..\..\..\marketally.aiplugin\MarketAlly.AIPlugin\MarketAlly.AIPlugin.csproj" />
</ItemGroup>
<ItemGroup Condition="!Exists('..\..\..\marketally.aiplugin\MarketAlly.AIPlugin\MarketAlly.AIPlugin.csproj')">
<PackageReference Include="MarketAlly.AIPlugin" Version="*" />
</ItemGroup>
</Project>