Skip to content

Commit 3c996b7

Browse files
committed
update CI
1 parent 8340bf2 commit 3c996b7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
3232
runs-on: ubuntu-latest
3333
needs: build-test
34+
env:
35+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
3436
steps:
3537
- name: Checkout
3638
uses: actions/checkout@v4
@@ -49,5 +51,5 @@ jobs:
4951
dotnet pack ./Release.sln -c Release --no-restore -o artifacts
5052
5153
- name: Publish to NuGet
52-
if: ${{ secrets.NUGET_API_KEY != '' }}
53-
run: dotnet nuget push "artifacts/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_API_KEY }}" --skip-duplicate
54+
if: env.NUGET_API_KEY != ''
55+
run: dotnet nuget push "artifacts/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate

0 commit comments

Comments
 (0)