Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalis authored Jul 25, 2023
1 parent c647049 commit eb3888f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish to Nuget

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build
run: dotnet build Ardalis.SharedKernel.sln --configuration Release
- name: Test
run: dotnet test Ardalis.SharedKernel.sln --configuration Release --no-build --no-restore
- name: Pack
run: dotnet pack Ardalis.SharedKernel.sln --configuration Release --no-build --no-restore --output .
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

0 comments on commit eb3888f

Please sign in to comment.