Skip to content

Commit c23daee

Browse files
committed
Adding nuget publish workflow
1 parent 417df6b commit c23daee

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [released, prereleased]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup .NET
15+
uses: actions/setup-dotnet@v4
16+
with:
17+
dotnet-version: '9.0.x'
18+
19+
- name: Restore dependencies
20+
run: dotnet restore
21+
22+
- name: Build
23+
run: dotnet build --no-restore --configuration Release
24+
25+
- name: Pack
26+
run: dotnet pack src/LightningDB --no-build --configuration Release --output ./artifacts
27+
28+
- name: Publish to NuGet
29+
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

0 commit comments

Comments
 (0)