Skip to content

feat: add new copyto method #20

feat: add new copyto method

feat: add new copyto method #20

Workflow file for this run

name: Release NuGet Package
on:
push:
tags:
- 'v*'
permissions: # Required for dorny/test-reporter@v1
contents: read
actions: read
checks: write
jobs:
release:
name: Release NuGet Package
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: src
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
- name: Install Coyote tool locally
run: dotnet tool install --global Microsoft.Coyote.CLI
- name: Add Coyote tool to PATH
run: echo "${HOME}/.dotnet/tools" >> $GITHUB_PATH
- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT
- name: Restore NuGet Packages
run: dotnet restore
- name: Build Solution
run: dotnet build --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }}
- name: Run Unit Tests
run: dotnet test --configuration Release --no-build --verbosity normal --logger "junit;LogFilePath=../results/test-results.xml" --collect:"XPlat Code Coverage"
- name: Test Report
uses: dorny/test-reporter@v1
if: always()
with:
name: Test Report
path: "**/test-results.xml"
reporter: java-junit
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: "**/coverage.cobertura.xml"
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Build NuGet Package
run: dotnet pack WouterVanRanst.Utils/WouterVanRanst.Utils.csproj --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }}
- name: Publish NuGet Package
run: dotnet nuget push WouterVanRanst.Utils/bin/Release/WouterVanRanst.Utils.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate