Skip to content

Commit 5449a6a

Browse files
committed
setup ci
1 parent 5bbeaff commit 5449a6a

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
name: Publish to NuGet
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Setup .NET
15+
uses: actions/setup-dotnet@v1
16+
with:
17+
dotnet-version: '10.0.x'
18+
- name: Restore dependencies
19+
run: dotnet restore
20+
- name: Build
21+
run: dotnet build --configuration Release --no-restore
22+
- name: Pack
23+
run: dotnet pack --configuration Release --no-build --output .
24+
- name: Push to NuGet
25+
run: dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)