Skip to content

#30 Fixed (#31)

#30 Fixed (#31) #176

Workflow file for this run

# This workflow will build a .NET project
name: OnPush (Build and Publish)
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore TrelloDotNet.sln
working-directory: TrelloDotNet
- name: Build
run: dotnet build --configuration Release --no-restore
working-directory: TrelloDotNet
- name: SetUserSecretsTrelloApiKey
run: dotnet user-secrets set TrelloApiKey ${{ secrets.TRELLOAPIKEY }} --project TrelloDotNet/TrelloDotNet.Tests/TrelloDotNet.Tests.csproj
- name: SetUserSecretsTrelloToken
run: dotnet user-secrets set TrelloToken ${{ secrets.TRELLOTOKEN }} --project TrelloDotNet/TrelloDotNet.Tests/TrelloDotNet.Tests.csproj
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal --p:CollectCoverage=true --p:CoverletOutput=TestResults/ --p:CoverletOutputFormat=lcov
working-directory: TrelloDotNet/TrelloDotNet.Tests
- name: Publish coverage report to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: TrelloDotNet/TrelloDotNet.Tests/TestResults/coverage.info
- name: Publish to NuGet if needed
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} -SkipDuplicate