2121 dotnet-version : 6.0.x
2222 - name : Restore dependencies
2323 run : dotnet restore
24-
25- - name : Fiddeling with secrets
26- env :
27- NUGET_TOKEN_EXISTS : ${{ secrets.NUGET_TOKEN }}
28- if : env.NUGET_TOKEN_EXISTS != ''
29- run : echo "NUGET_TOKEN_EXISTS exists - implementation of secret checking working on all runners"
3024 - name : Build
3125 run : dotnet build --configuration Release --no-restore
3226 - name : Test
@@ -47,13 +41,17 @@ jobs:
4741 - name : Build
4842 run : dotnet build --configuration Release --no-restore
4943 - name : NugetPush
50- env :
51- NUGET_TOKEN_EXISTS : ${{ secrets.NUGET_TOKEN }}
44+ env :
45+ NUGET_TOKEN_EXISTS : ${{ secrets.NUGET_TEST_TOKEN }}
5246 if : env.NUGET_TOKEN_EXISTS != ''
5347 run : |
5448 ls ./GithubActionsHelloWorld/bin/Release
55- dotnet nuget push ./GithubActionsHelloWorld/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}} --source https://apiint.nugettest.org/v3/index.json
56- - uses : " marvinpinto/action-automatic-releases@latest"
49+ dotnet nuget push ./GithubActionsHelloWorld/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TEST_TOKEN}} --source https://apiint.nugettest.org/v3/index.json
50+ - name : Github release
51+ env :
52+ GITHUB_TOKEN_EXISTS : ${{ secrets.GITHUB_TOKEN }}
53+ if : env.GITHUB_TOKEN_EXISTS != ''
54+ uses : " marvinpinto/action-automatic-releases@latest"
5755 with :
5856 repo_token : " ${{ secrets.GITHUB_TOKEN }}"
5957 automatic_release_tag : " ${{ env.CURRENT_VERSION }}"
@@ -79,12 +77,16 @@ jobs:
7977 run : dotnet build --configuration Release --no-restore
8078 - name : NugetPush
8179 env :
82- NUGET_TOKEN_EXISTS : ${{ secrets.NUGET_TEST_TOKEN }}
83- if : env.NUGET_TOKEN_EXISTS != ''
80+ NUGET_TOKEN_TEST_EXISTS : ${{ secrets.NUGET_TEST_TOKEN }}
81+ if : env.NUGET_TOKEN_TEST_EXISTS != ''
8482 run : |
8583 ls ./GithubActionsHelloWorld/bin/Release
8684 dotnet nuget push ./GithubActionsHelloWorld/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TEST_TOKEN}} --source https://apiint.nugettest.org/v3/index.json
87- - uses : " marvinpinto/action-automatic-releases@latest"
85+ - name : Github release
86+ env :
87+ GITHUB_TOKEN_EXISTS : ${{ secrets.GITHUB_TOKEN }}
88+ if : env.GITHUB_TOKEN_EXISTS != ''
89+ uses : " marvinpinto/action-automatic-releases@latest"
8890 with :
8991 repo_token : " ${{ secrets.GITHUB_TOKEN }}"
9092 automatic_release_tag : " ${{ env.CURRENT_VERSION }}"
0 commit comments