Skip to content

Commit 0b4c72c

Browse files
committed
chore: add publish-nuget job
1 parent 019629f commit 0b4c72c

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,23 @@ jobs:
5353
with:
5454
name: HarpoS7.PoC_Windows_x64_SelfContained
5555
path: ./windows/*
56+
57+
publish-nuget:
58+
runs-on: ubuntu-latest
59+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
60+
environment: nuget-release
61+
needs: [build]
62+
permissions:
63+
id-token: write # enable GitHub OIDC token issuance for this job
64+
steps:
65+
- uses: actions/download-artifact@v7
66+
with:
67+
name: HarpoS7-NuGet-Packages
68+
path: ./artifacts
69+
- name: NuGet login
70+
uses: NuGet/login@v1
71+
id: login
72+
with:
73+
user: ${{ secrets.NUGET_USER }}
74+
- name: Publish to NuGet
75+
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

0 commit comments

Comments
 (0)