Skip to content

Commit c23c79b

Browse files
committed
ci: add NuGet publish workflow (packs + pushes on v* tag)
1 parent d37a0e7 commit c23c79b

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish
2+
on:
3+
push:
4+
tags: ['v*']
5+
workflow_dispatch:
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-dotnet@v4
12+
with:
13+
dotnet-version: '8.0.x'
14+
- run: dotnet restore
15+
- run: dotnet build -c Release --no-restore
16+
- run: dotnet pack src/IPDataInfo.Sdk/IPDataInfo.Sdk.csproj -c Release --no-build -o out
17+
- name: Push to NuGet
18+
run: dotnet nuget push "out/*.nupkg" --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate

0 commit comments

Comments
 (0)