Skip to content

Commit

Permalink
Merge pull request #15 from sia-digital/fix/tag-creation
Browse files Browse the repository at this point in the history
(trial&error): tag and release
  • Loading branch information
fb-smit authored Nov 23, 2023
2 parents ab87edd + 54836de commit 1f304bf
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ jobs:
uses: ncipollo/release-action@v1
with:
commit: main
tag: v${{ NBGV_NuGetPackageVersion }}
tag: 'v${{ steps.nbgv.outputs.NuGetPackageVersion }}'
generateReleaseNotes: true
102 changes: 51 additions & 51 deletions .github/workflows/dotnet-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,64 +14,64 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- name: setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'

- name: install
run: dotnet restore
- name: install
run: dotnet restore

- name: format
run: dotnet format --verify-no-changes --no-restore
- name: format
run: dotnet format --verify-no-changes --no-restore

- name: build
run: dotnet build -c Release
- name: build
run: dotnet build -c Release

- name: test & cover
run: dotnet test --collect "Code Coverage;Format=Xml;CoverageFileName=coverage.xml" --results-directory "./test-results" --no-restore --nologo -c Release --logger trx
- name: test & cover
run: dotnet test --collect "Code Coverage;Format=Xml;CoverageFileName=coverage.xml" --results-directory "./test-results" --no-restore --nologo -c Release --logger trx

- name: publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
test-results/**/*.trx
- name: publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
test-results/**/*.trx
- name: publish coverage results
uses: im-open/code-coverage-report-generator@4
with:
reports: '*/**/coverage.xml'
targetdir: './coverage-results'
title: dotnet code coverage
reporttypes: 'MarkdownSummary;'
assemblyfilters: +PiBox*
- name: publish coverage results
uses: im-open/code-coverage-report-generator@4
with:
reports: '*/**/coverage.xml'
targetdir: './coverage-results'
title: dotnet code coverage
reporttypes: 'MarkdownSummary;'
assemblyfilters: +PiBox*

- name: Create a status check for the code coverage results
id: dotnet-coverage-check
#You may also reference just the major or major.minor version
uses: im-open/process-code-coverage-summary@v2.2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
summary-file: './coverage-results/Summary.md'
report-name: '.NET Code Coverage' # Default: Code Coverage Results
check-name: 'dotnet code coverage' # Default: code coverage
create-status-check: true # Default: true
create-pr-comment: true # Default: true
update-comment-if-one-exists: true # Default: true
update-comment-key: 'dotnet' # Default: N/A, used to further identify a comment to update if this action is used more than once in a workflow
ignore-threshold-failures: false # Default: false
line-threshold: 80 # Default: 0, which means thresholds are not applied
branch-threshold: 0 # Default: 0, which means thresholds are not applied
- name: Create a status check for the code coverage results
id: dotnet-coverage-check
#You may also reference just the major or major.minor version
uses: im-open/process-code-coverage-summary@v2.2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
summary-file: './coverage-results/Summary.md'
report-name: '.NET Code Coverage' # Default: Code Coverage Results
check-name: 'dotnet code coverage' # Default: code coverage
create-status-check: true # Default: true
create-pr-comment: true # Default: true
update-comment-if-one-exists: true # Default: true
update-comment-key: 'dotnet' # Default: N/A, used to further identify a comment to update if this action is used more than once in a workflow
ignore-threshold-failures: false # Default: false
line-threshold: 80 # Default: 0, which means thresholds are not applied
branch-threshold: 0 # Default: 0, which means thresholds are not applied

- name: Upload coverage report artifact
uses: actions/upload-artifact@v3
with:
name: Coverage Report
path: coverage-results/**
- name: Upload coverage report artifact
uses: actions/upload-artifact@v3
with:
name: Coverage Report
path: coverage-results/**

- name: Write to Job Summary
run: cat ./coverage-results/Summary.md >> $GITHUB_STEP_SUMMARY
- name: Write to Job Summary
run: cat ./coverage-results/Summary.md >> $GITHUB_STEP_SUMMARY

0 comments on commit 1f304bf

Please sign in to comment.