Skip to content

Commit c3e6116

Browse files
authored
Create publish.yml
1 parent 1a6d1b5 commit c3e6116

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+
name: Publish to Nuget
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Setup dotnet
15+
uses: actions/setup-dotnet@v3
16+
with:
17+
dotnet-version: 8.0.x
18+
- name: Build
19+
run: dotnet build NimblePros.SharedKernel.sln --configuration Release
20+
- name: Test
21+
run: dotnet test NimblePros.SharedKernel.sln --configuration Release --no-build --no-restore
22+
- name: Pack
23+
run: dotnet pack NimblePros.SharedKernel.sln --configuration Release --no-build --no-restore --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)