Skip to content

Commit 0516f65

Browse files
authored
Merge pull request #1 from NetCoreApps/copilot/update-github-actions-restore
Fix CI: Explicitly use repository NuGet.config during restore
2 parents 06819dd + 5fd6b1a commit 0516f65

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,29 @@ jobs:
1818
with:
1919
dotnet-version: 10.0.x
2020

21+
- name: Restore NuGet packages (use repo NuGet.config)
22+
run: dotnet restore TechStacks.sln --configfile ./NuGet.Config
23+
24+
# If your feed requires authentication, enable and configure the step below.
25+
# This example uses a Personal Access Token stored in secrets.NUGET_API_KEY.
26+
# Alternatively, you can use the NuGet Authenticate action from Azure Pipelines.
27+
# - name: Authenticate private NuGet feed
28+
# env:
29+
# NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
30+
# run: |
31+
# dotnet nuget add source "https://YOUR_FEED_URL/index.json" \
32+
# --name "PrivateFeed" \
33+
# --username "YOUR_USERNAME" \
34+
# --password "$NUGET_API_KEY" \
35+
# --store-password-in-clear-text
36+
2137
- name: build
22-
run: dotnet build --configfile NuGet.Config
38+
run: dotnet build --no-restore
2339
working-directory: .
2440

2541
# - name: test
2642
# run: |
27-
# dotnet test
43+
# dotnet test --no-restore
2844
# if [ $? -eq 0 ]; then
2945
# echo TESTS PASSED
3046
# else

0 commit comments

Comments
 (0)