Skip to content

Commit

Permalink
Added 1.x Push GitHubAction
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjdk committed Jan 27, 2025
1 parent 8a2bfaa commit f1bb6e7
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/OnPush-1.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will build a .NET project

name: OnPush (Build and Publish)
on:
push:
branches: [ "version_1.x" ]

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

0 comments on commit f1bb6e7

Please sign in to comment.