Skip to content

simplify build commands #147

simplify build commands

simplify build commands #147

Workflow file for this run

name: Build, Test, and Deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build --configuration Release
- name: Run tests
run: dotnet test --no-build --configuration Release
- name: Pack
run: dotnet pack src --no-build --configuration Release --output ./nupkg
- name: Publish to NuGet
if: startsWith(github.ref, 'refs/tags/')
run: dotnet nuget push ./nupkg/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
- name: Publish to GitHub Packages
if: startsWith(github.ref, 'refs/tags/')
run: dotnet nuget push ./nupkg/*.nupkg -k ${{ secrets.GPM_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json