Skip to content

Commit 21f84e6

Browse files
authored
Update dotnet.yml
1 parent 52e5e45 commit 21f84e6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/dotnet.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,12 @@ jobs:
4747
- name: Build
4848
run: dotnet build --configuration Release --no-restore
4949
- name: NugetPush
50+
env:
51+
NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TOKEN }}
52+
if: env.NUGET_TOKEN_EXISTS != ''
5053
run: |
5154
ls ./GithubActionsHelloWorld/bin/Release
52-
dotnet nuget push ./GithubActionsHelloWorld/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}} --source https://apiint.nugettest.org/v3/index.json
55+
dotnet nuget push ./GithubActionsHelloWorld/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}} --source https://api.nuget.org/v3/index.json
5356
- uses: "marvinpinto/action-automatic-releases@latest"
5457
with:
5558
repo_token: "${{ secrets.GITHUB_TOKEN }}"
@@ -75,9 +78,12 @@ jobs:
7578
- name: Build
7679
run: dotnet build --configuration Release --no-restore
7780
- name: NugetPush
81+
env:
82+
NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TEST_TOKEN }}
83+
if: env.NUGET_TOKEN_EXISTS != ''
7884
run: |
7985
ls ./GithubActionsHelloWorld/bin/Release
80-
# dotnet nuget push ./GithubActionsHelloWorld/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}} --source https://api.nuget.org/v3/index.json
86+
# dotnet nuget push ./GithubActionsHelloWorld/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TEST_TOKEN}} --source https://apiint.nugettest.org/v3/index.json
8187
- uses: "marvinpinto/action-automatic-releases@latest"
8288
with:
8389
repo_token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)