Skip to content

Commit 61528b0

Browse files
committed
run nuget login only when releasing
1 parent 9d09ba1 commit 61528b0

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,19 @@ jobs:
1818
with:
1919
dotnet-version: 10.0.x
2020

21-
- name: NuGet login
22-
uses: NuGet/login@v1
23-
id: login
24-
with:
25-
user: ${{secrets.NUGET_USER}}
26-
2721
- name: Build
2822
run: dotnet build --configuration Release
2923

3024
- name: Run tests
3125
run: dotnet test --no-build --configuration Release
3226

27+
- name: NuGet login
28+
uses: NuGet/login@v1
29+
if: startsWith(github.ref, 'refs/tags/')
30+
id: login
31+
with:
32+
user: ${{secrets.NUGET_USER}}
33+
3334
- name: Pack
3435
if: startsWith(github.ref, 'refs/tags/')
3536
run: dotnet pack src --no-build --configuration Release --output ./nupkg

0 commit comments

Comments
 (0)