Skip to content

Commit 0fd992f

Browse files
committed
Update dotnet.yml
1 parent 4b1aa60 commit 0fd992f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/dotnet.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: .NET build and test
22
env:
33
CURRENT_VERSION: 1.0.${{ github.run_number }}
44
LAST_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
5-
NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TOKEN }}
6-
NUGET_TOKEN_TEST_EXISTS: ${{ secrets.NUGET_TEST_TOKEN }}
75

86
on:
97
push:
@@ -33,7 +31,9 @@ jobs:
3331
run: dotnet test --no-build --verbosity normal --configuration Release
3432

3533
deployRelease:
36-
if: github.ref == 'refs/heads/main' && ${{ secrets.NUGET_TOKEN != '' }}
34+
env:
35+
NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TOKEN }}
36+
if: github.ref == 'refs/heads/main' && ${{ env.NUGET_TOKEN_EXISTS != '' }}
3737
runs-on: ubuntu-latest
3838
needs: build
3939
steps:
@@ -61,7 +61,9 @@ jobs:
6161
./GithubActionsHelloWorld/bin/Release/*.snupkg
6262
6363
deployTest:
64-
if: github.ref != 'refs/heads/main' && ${{ secrets.NUGET_TEST_TOKEN != '' }}
64+
env:
65+
NUGET_TOKEN_TEST_EXISTS: ${{ secrets.NUGET_TEST_TOKEN }}
66+
if: github.ref != 'refs/heads/main' && ${{ env.NUGET_TOKEN_TEST_EXISTS != '' }}
6567
runs-on: ubuntu-latest
6668
needs: build
6769
steps:

0 commit comments

Comments
 (0)