Skip to content

Build and Publish

Build and Publish #5

Workflow file for this run

name: Build and Publish
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ./NeoBus/NeoBus.csproj
- name: Build
run: dotnet build ./NeoBus/NeoBus.csproj --configuration Release --no-restore
- name: Test
run: dotnet test ./NeoBus/NeoBus.csproj --no-restore --verbosity normal
- name: Pack
run: dotnet pack ./NeoBus/NeoBus.csproj --no-build --configuration Release --output nupkgs
- name: Push
run: dotnet nuget push ./nupkgs/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json