feat: fix null value handling logic (#337) #32
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: Release | |
on: | |
push: | |
branches: | |
- master | |
- main | |
- 1.x | |
workflow_dispatch: | |
env: | |
SHA: ${{ GITHUB.SHA }} | |
REF: ${{ GITHUB.REF }} | |
RUN_ID: ${{ GITHUB.RUN_ID }} | |
RUN_NUMBER: ${{ GITHUB.RUN_NUMBER }} | |
BUILD_RUN_NUMBER: build.${{ GITHUB.RUN_NUMBER }} | |
GITHUB_TOKEN: ${{ SECRETS.GITHUB_TOKEN }} | |
MYGET_API_TOKEN: ${{ SECRETS.MYGET_API_TOKEN }} | |
NUGET_API_TOKEN: ${{ SECRETS.NUGET_API_KEY }} | |
COVERALLS_REPO_TOKEN: ${{ SECRETS.COVERALLS_REPO_TOKEN }} | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: | | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
8.0.x | |
include-prerelease: true | |
- name: Check .NET info | |
run: dotnet --info | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build solution | |
run: dotnet build -c Release --no-restore | |
- name: Test solution | |
run: dotnet test -c Release --no-build --no-restore --verbosity normal --results-directory test-results --collect:"XPlat Code Coverage" ` | |
-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=json,cobertura,lcov,teamcity,opencover | |
- name: Upload coverage | |
run: | | |
dotnet tool install coveralls.net --version 3.0.0 --tool-path tools; | |
$CommitAuthor = git show -s --pretty=format:"%cn"; | |
echo "Coomit author is: $CommitAuthor"; | |
$CommitAuthorEmail = git show -s --pretty=format:"%ce"; | |
echo "Coomit author email is: $CommitAuthorEmail"; | |
$CommitMessage = git show -s --pretty=format:"%s"; | |
echo "Coomit message is: $CommitMessage"; | |
cp test-results/**/*.opencover.xml test-results | |
tools/csmacnz.Coveralls --opencover -i test-results/coverage.opencover.xml --repoToken $env:COVERALLS_REPO_TOKEN ` | |
--commitId $env:SHA --commitBranch $env:REF --commitAuthor "$CommitAuthor" ` | |
--commitEmail "$CommitAuthorEmail" --commitMessage "$CommitMessage" ` | |
--jobId $env:RUN_NUMBER --serviceName github-actions --useRelativePaths; | |
if($LastExitCode -ne 0) | |
{ | |
Write-Warning -Message "Can not upload coverage, last exit code is ${LastExitCode}." | |
$LastExitCode = 0; | |
} | |
- name: Upload test results artefacts | |
uses: actions/[email protected] | |
with: | |
name: "drop-ci-test-results" | |
path: './test-results' | |
run-semantic-release: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run semantic-release | |
run: | | |
export PATH=$PATH:$(yarn global bin) | |
yarn global add [email protected] | |
semantic-release |