Skip to content

Commit

Permalink
add nuget config setup step
Browse files Browse the repository at this point in the history
  • Loading branch information
asv-soft-u03 authored Jun 7, 2024
1 parent 4211600 commit 3f75389
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/BuildForWindows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,30 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2


- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x

- name: Setup NuGet config
env:
NUGET_USERNAME: ${{ secrets.USER_NAME }}
NUGET_PASSWORD: ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }}
run: |
echo "<configuration>" > nuget.config
echo "<packageSources>" >> nuget.config
echo "<add key=\"nuget.org\" value=\"https://api.nuget.org/v3/index.json\" protocolVersion=\"3\" />" >> nuget.config
echo "<add key=\"asv\" value=\"https://nuget.pkg.github.com/asv-soft/index.json\" />" >> nuget.config
echo "</packageSources>" >> nuget.config
echo "<packageSourceCredentials>" >> nuget.config
echo "<asv>" >> nuget.config
echo "<add key=\"Username\" value=\"$NUGET_USERNAME\" />" >> nuget.config
echo "<add key=\"ClearTextPassword\" value=\"$NUGET_PASSWORD\" />" >> nuget.config
echo "</asv>" >> nuget.config
echo "</packageSourceCredentials>" >> nuget.config
echo "</configuration>" >> nuget.config
- name: Install Workloads
run: |
Expand Down

0 comments on commit 3f75389

Please sign in to comment.