Skip to content

updated build pipline to publish artifact #11

updated build pipline to publish artifact

updated build pipline to publish artifact #11

name: build and test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --filter Category=UnitTest --no-restore --verbosity normal
- name: Generate coverage report
run: dotnet test --filter Category=UnitTest --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov
- name: Pack NuGet-Package
run: dotnet pack --configuration Release --no-restore --no-build --output nupkgs
- name: Upload NuGet-Package
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: /home/runner/work/RedmineHourglassNet/RedmineHourglassNet/nupkgs/Develappers.RedmineHourglassApi.2.0.0-alpha.nupkg
- name: Publish coverage report to coveralls.io
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./Develappers.RedmineHourglassApi.Tests/TestResults/coverage.info