Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-drewery committed Dec 18, 2023
1 parent 4e83785 commit 3632476
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: NuGet Package Deployment

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup .NET Core
uses: actions/setup-dotnet@v1

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --no-restore --verbosity normal

- name: Pack
run: dotnet pack --configuration Release --no-build --output nupkgs

- name: Publish
run: dotnet nuget push "nupkgs/*.nupkg" --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY }}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

0 comments on commit 3632476

Please sign in to comment.