Skip to content

Commit 1b28874

Browse files
authored
Merge ce75077 into 0f8c5ea
2 parents 0f8c5ea + ce75077 commit 1b28874

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/dotnet.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ jobs:
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"
2430
- name: Build
2531
run: dotnet build --configuration Release --no-restore
2632
- name: Test
@@ -41,9 +47,12 @@ jobs:
4147
- name: Build
4248
run: dotnet build --configuration Release --no-restore
4349
- name: NugetPush
50+
env:
51+
NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TOKEN }}
52+
if: env.NUGET_TOKEN_EXISTS != ''
4453
run: |
4554
ls ./GithubActionsHelloWorld/bin/Release
46-
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
4756
- uses: "marvinpinto/action-automatic-releases@latest"
4857
with:
4958
repo_token: "${{ secrets.GITHUB_TOKEN }}"
@@ -69,9 +78,12 @@ jobs:
6978
- name: Build
7079
run: dotnet build --configuration Release --no-restore
7180
- name: NugetPush
81+
env:
82+
NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TEST_TOKEN }}
83+
if: env.NUGET_TOKEN_EXISTS != ''
7284
run: |
7385
ls ./GithubActionsHelloWorld/bin/Release
74-
# 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
7587
- uses: "marvinpinto/action-automatic-releases@latest"
7688
with:
7789
repo_token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)