Skip to content

Commit a3b3a49

Browse files
committed
fix pipeline
1 parent 45b9e19 commit a3b3a49

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,11 @@ jobs:
144144
--output nupkgs
145145
146146
- name: Push to NuGet
147-
run: >
148-
dotnet nuget push "nupkgs/*.nupkg"
149-
--api-key ${{ secrets.NUGET_API_KEY }}
150-
--source https://api.nuget.org/v3/index.json
151-
--skip-duplicate
147+
if: ${{ secrets.NUGET_API_KEY != '' }}
148+
env:
149+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
150+
run: |
151+
dotnet nuget push "nupkgs/*.nupkg" \
152+
--api-key "$NUGET_API_KEY" \
153+
--source https://api.nuget.org/v3/index.json \
154+
--skip-duplicate

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,14 @@ jobs:
282282
--output nupkgs
283283
284284
- name: Push to NuGet
285-
run: >
286-
dotnet nuget push "nupkgs/*.nupkg"
287-
--api-key ${{ secrets.NUGET_API_KEY }}
288-
--source https://api.nuget.org/v3/index.json
289-
--skip-duplicate
285+
if: ${{ secrets.NUGET_API_KEY != '' }}
286+
env:
287+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
288+
run: |
289+
dotnet nuget push "nupkgs/*.nupkg" \
290+
--api-key "$NUGET_API_KEY" \
291+
--source https://api.nuget.org/v3/index.json \
292+
--skip-duplicate
290293
291294
# ── Publish the release ───────────────────────────────────────────────
292295
- name: Create GitHub release

0 commit comments

Comments
 (0)