Skip to content

Commit 97974d0

Browse files
committed
📝 Chore(Actions): Use nuget with dotnet instead of single one.
1 parent c3b549f commit 97974d0

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v3
2929

3030
- name: Setup .NET
31-
uses: actions/setup-dotnet@v2
31+
uses: actions/setup-dotnet@v3
3232
with:
3333
dotnet-version: |
3434
6.0.x
@@ -50,16 +50,10 @@ jobs:
5050
- name: Add to GitHub Repo
5151
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request' }}
5252
run: |
53-
nuget sources add -name github -Source https://nuget.pkg.github.com/Crequency/index.json -Username Crequency -Password ${{ secrets.GitHubToken }}
54-
55-
- name: Install NuGet
56-
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request' }}
57-
uses: nuget/setup-nuget@v1
58-
with:
59-
nuget-version: "6.x"
53+
dotnet nuget add source --username Crequency --password ${{ secrets.GITHUBTOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Crequency/index.json"
6054
6155
- name: Publish Package to GitHub and NuGet
6256
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request' }}
6357
run: |
64-
nuget push ./Common.BasicHelper/bin/Release/*.nupkg -Source github -SkipDuplicate -Verbosity detailed
65-
nuget push ./Common.BasicHelper/bin/Release/*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbol -Verbosity detailed
58+
dotnet nuget push "./Common.BasicHelper/bin/Release/*.nupkg" --api-key ${{ secrets.GITHUBTOKEN }} --source "github" --skip-duplicate
59+
dotnet nuget push "./Common.BasicHelper/bin/Release/*.nupkg" --api-key ${{ secrets.NUGETKEY }} --source "https://api.nuget.org/v3/index.json" --skip-duplicate --no-symbols

0 commit comments

Comments
 (0)