Prepared code for 2.x development by removing everything Obsolete #223
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
# 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@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore TrelloDotNet.sln | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: SetUserSecretsTrelloApiKey | |
run: dotnet user-secrets set TrelloApiKey ${{ secrets.TRELLOAPIKEY }} --project src/TrelloDotNet.Tests/TrelloDotNet.Tests.csproj | |
- name: SetUserSecretsTrelloToken | |
run: dotnet user-secrets set TrelloToken ${{ secrets.TRELLOTOKEN }} --project src/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: src/TrelloDotNet.Tests | |
- name: Publish coverage report to coveralls.io | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: src/TrelloDotNet.Tests/TestResults/coverage.info | |
- name: Publish to NuGet if needed | |
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate |