Merge pull request #298 from gui-cs/color-picker-hsv-support #918
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: Build, test and package | |
on: push | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cd src && dotnet build | |
- name: Test | |
run: | | |
cd tests && dotnet test --configuration Debug --verbosity normal --collect:'XPlat Code Coverage' --settings coverlet.runsettings | |
- name: Move test results to accessible directory | |
run: | | |
mkdir -p TestResults | |
find tests/TestResults -type f -name "*.xml" -exec mv -v --backup=numbered {} TestResults/ \; | |
- name: Create Test Coverage Badge | |
uses: simon-k/[email protected] | |
id: create_coverage_badge | |
with: | |
label: Unit Test Coverage | |
color: brightgreen | |
path: TestResults/coverage.opencover.xml | |
gist-filename: code-coverage.json | |
# https://gist.github.com/tznind/2a31eee1c9151917aa8d17b59bc86633 | |
gist-id: 2a31eee1c9151917aa8d17b59bc86633 | |
gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }} | |
- name: Print Code Coverage | |
run: | | |
echo "Code coverage percentage: ${{steps.create_coverage_badge.outputs.percentage}}%" | |
echo "Badge data: ${{steps.create_coverage_badge.outputs.badge}}" | |
- name: Pack | |
run: cd src && dotnet pack --configuration Debug --output ./nupkg | |
- name: Publish to NuGet | |
if: contains(github.ref, 'refs/tags/v') | |
run: dotnet nuget push ./src/nupkg/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |