Run tests #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
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 Ibis.MutexLeaderElection/Ibis.MutexLeaderElection.csproj | |
- name: Build | |
run: dotnet build Ibis.MutexLeaderElection/Ibis.MutexLeaderElection.csproj --configuration Release | |
- name: Run tests | |
run: dotnet test Ibis.MutexLeaderElection.Tests/Ibis.MutexLeaderElection.Tests.csproj --no-build --verbosity normal | |
- name: Pack with dotnet | |
run: dotnet pack Ibis.MutexLeaderElection/Ibis.MutexLeaderElection.csproj --output nuget --configuration Release | |
- name: Upload Assembly Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: Build output | |
path: /home/runner/work/Ibis.MutexLeaderElection/Ibis.MutexLeaderElection/Ibis.MutexLeaderElection/bin/Release/ | |
- name: Upload Package Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: Package output | |
path: nuget/*.nupkg | |
- name: Publish NuGet using Dotnet | |
run: dotnet nuget push nuget/*.nupkg --api-key ${{secrets.NUGET}} --skip-duplicate --source https://api.nuget.org/v3/index.json |