diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index ef4ca4b..479a82e 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -49,6 +49,18 @@ "commands": [ "sarifmark" ] + }, + "demaconsulting.buildmark": { + "version": "0.2.0", + "commands": [ + "buildmark" + ] + }, + "demaconsulting.versionmark": { + "version": "0.1.0", + "commands": [ + "versionmark" + ] } } } \ No newline at end of file diff --git a/.cspell.json b/.cspell.json index 5bee7d6..90a3230 100644 --- a/.cspell.json +++ b/.cspell.json @@ -4,6 +4,8 @@ "words": [ "Anson", "Blockquotes", + "buildmark", + "buildnotes", "camelcase", "copilot", "cspell", @@ -33,8 +35,11 @@ "opencover", "pagetitle", "pandoc", + "pandoctool", "reqstream", "ReqStream", + "Sarif", + "sarifmark", "SBOM", "semver", "snupkg", @@ -49,7 +54,9 @@ "trx", "vbproj", "vcxproj", + "versionmark", "Weasyprint", + "weasyprinttool", "yamllint" ], "ignorePaths": [ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b598697..e752175 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,6 +19,28 @@ jobs: - name: Checkout uses: actions/checkout@v6 + - name: Setup dotnet + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.x + + - name: Restore Tools + run: > + dotnet tool restore + + - name: Capture tool versions + shell: bash + run: | + echo "Capturing tool versions..." + dotnet versionmark --capture --job-id "quality" -- dotnet git versionmark + echo "✓ Tool versions captured" + + - name: Upload version capture + uses: actions/upload-artifact@v6 + with: + name: version-capture-quality + path: versionmark-quality.json + - name: Run markdown linter uses: DavidAnson/markdownlint-cli2-action@v22 with: @@ -146,6 +168,23 @@ jobs: --no-restore --property:PackageVersion=${{ inputs.version }} + - name: Capture tool versions + shell: bash + run: | + echo "Capturing tool versions..." + # Create short job ID: build-win, build-ubuntu + OS_SHORT=$(echo "${{ matrix.os }}" | sed 's/windows-latest/win/;s/ubuntu-latest/ubuntu/') + JOB_ID="build-${OS_SHORT}" + dotnet versionmark --capture --job-id "${JOB_ID}" -- \ + dotnet git dotnet-sonarscanner versionmark + echo "✓ Tool versions captured" + + - name: Upload version capture + uses: actions/upload-artifact@v6 + with: + name: version-capture-${{ matrix.os }} + path: versionmark-build-*.json + - name: Upload Test Results uses: actions/upload-artifact@v6 with: @@ -215,6 +254,19 @@ jobs: output: sarif-results upload: false + - name: Capture tool versions + shell: bash + run: | + echo "Capturing tool versions..." + dotnet versionmark --capture --job-id "codeql" -- dotnet git versionmark + echo "✓ Tool versions captured" + + - name: Upload version capture + uses: actions/upload-artifact@v6 + with: + name: version-capture-codeql + path: versionmark-codeql.json + - name: Upload SARIF uses: actions/upload-artifact@v6 with: @@ -264,6 +316,21 @@ jobs: name: codeql-sarif path: codeql-results + - name: Download all version captures + uses: actions/download-artifact@v7 + with: + path: version-captures + pattern: 'version-capture-*' + continue-on-error: true + + - name: Capture tool versions for build-docs + shell: bash + run: | + echo "Capturing tool versions..." + dotnet versionmark --capture --job-id "build-docs" -- \ + dotnet git node npm pandoc weasyprint sarifmark sonarmark reqstream buildmark versionmark + echo "✓ Tool versions captured" + - name: Generate Requirements Report, Trace Matrix, and Justifications run: > dotnet reqstream @@ -387,8 +454,57 @@ jobs: docs/quality/quality.html "docs/TestResults Code Quality.pdf" + - name: Generate Build Notes with BuildMark + shell: bash + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: > + dotnet buildmark + --build-version ${{ inputs.version }} + --report docs/buildnotes.md + --report-depth 1 + + - name: Display Build Notes Report + shell: bash + run: | + echo "=== Build Notes Report ===" + cat docs/buildnotes.md + + - name: Publish Tool Versions + shell: bash + run: | + echo "Publishing tool versions..." + dotnet versionmark --publish --report docs/buildnotes/versions.md --report-depth 1 \ + -- "versionmark-*.json" "version-captures/**/versionmark-*.json" + echo "✓ Tool versions published" + + - name: Display Tool Versions Report + shell: bash + run: | + echo "=== Tool Versions Report ===" + cat docs/buildnotes/versions.md + + - name: Generate Build Notes HTML with Pandoc + shell: bash + run: > + dotnet pandoc + --defaults docs/buildnotes/definition.yaml + --filter node_modules/.bin/mermaid-filter.cmd + --metadata version="${{ inputs.version }}" + --metadata date="$(date +'%Y-%m-%d')" + --output docs/buildnotes/buildnotes.html + + - name: Generate Build Notes PDF with Weasyprint + run: > + dotnet weasyprint + --pdf-variant pdf/a-3u + docs/buildnotes/buildnotes.html + "docs/TestResults Build Notes.pdf" + - name: Upload Documentation uses: actions/upload-artifact@v6 with: name: documentation - path: docs/*.pdf + path: | + docs/*.pdf + docs/buildnotes.md diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e5a9a1a..a72ce04 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,6 +61,11 @@ jobs: name: documentation path: artifacts + - name: Move buildnotes.md to root + run: | + set -e + mv artifacts/docs/buildnotes.md buildnotes.md + - name: Clean Artifacts shell: bash run: | @@ -71,7 +76,8 @@ jobs: uses: ncipollo/release-action@v1 with: artifacts: 'artifacts/**/*' - generateReleaseNotes: true + bodyFile: buildnotes.md + generateReleaseNotes: false tag: ${{ inputs.version }} - name: Publish to Nuget diff --git a/.versionmark.yaml b/.versionmark.yaml new file mode 100644 index 0000000..b8bf259 --- /dev/null +++ b/.versionmark.yaml @@ -0,0 +1,64 @@ +--- +# VersionMark Configuration File +# This file defines which tools to capture and how to extract their version information. + +tools: + # .NET SDK + dotnet: + command: dotnet --version + regex: '(?\d+\.\d+\.\d+(?:\.\d+)?)' + + # Git + git: + command: git --version + regex: '(?i)git version (?\d+\.\d+\.\d+)' + + # Node.js + node: + command: node --version + regex: '(?i)v(?\d+\.\d+\.\d+)' + + # npm + npm: + command: npm --version + regex: '(?\d+\.\d+\.\d+)' + + # SonarScanner for .NET (from dotnet tool list) + dotnet-sonarscanner: + command: dotnet tool list + regex: '(?i)dotnet-sonarscanner\s+(?\d+\.\d+\.\d+)' + + # Pandoc (DemaConsulting.PandocTool from dotnet tool list) + pandoc: + command: dotnet tool list + regex: '(?i)demaconsulting\.pandoctool\s+(?\d+\.\d+\.\d+)' + + # WeasyPrint (DemaConsulting.WeasyPrintTool from dotnet tool list) + weasyprint: + command: dotnet tool list + regex: '(?i)demaconsulting\.weasyprinttool\s+(?\d+\.\d+\.\d+)' + + # SarifMark (DemaConsulting.SarifMark from dotnet tool list) + sarifmark: + command: dotnet tool list + regex: '(?i)demaconsulting\.sarifmark\s+(?\d+\.\d+\.\d+)' + + # SonarMark (DemaConsulting.SonarMark from dotnet tool list) + sonarmark: + command: dotnet tool list + regex: '(?i)demaconsulting\.sonarmark\s+(?\d+\.\d+\.\d+)' + + # ReqStream (DemaConsulting.ReqStream from dotnet tool list) + reqstream: + command: dotnet tool list + regex: '(?i)demaconsulting\.reqstream\s+(?\d+\.\d+\.\d+)' + + # BuildMark (DemaConsulting.BuildMark from dotnet tool list) + buildmark: + command: dotnet tool list + regex: '(?i)demaconsulting\.buildmark\s+(?\d+\.\d+\.\d+)' + + # VersionMark (DemaConsulting.VersionMark from dotnet tool list) + versionmark: + command: dotnet tool list + regex: '(?i)demaconsulting\.versionmark\s+(?\d+\.\d+\.\d+)' diff --git a/docs/buildnotes/definition.yaml b/docs/buildnotes/definition.yaml new file mode 100644 index 0000000..62699f2 --- /dev/null +++ b/docs/buildnotes/definition.yaml @@ -0,0 +1,12 @@ +--- +resource-path: + - docs/buildnotes + - docs/template +input-files: + - docs/buildnotes/title.txt + - docs/buildnotes/introduction.md + - docs/buildnotes.md + - docs/buildnotes/versions.md +template: template.html +table-of-contents: true +number-sections: true diff --git a/docs/buildnotes/introduction.md b/docs/buildnotes/introduction.md new file mode 100644 index 0000000..151c416 --- /dev/null +++ b/docs/buildnotes/introduction.md @@ -0,0 +1,33 @@ +# Introduction + +This document contains the build notes for the TestResults library. + +## Purpose + +This report serves as a comprehensive record of changes and bug fixes for this +release of TestResults. It provides transparency about what has changed since the +previous version and helps users understand the improvements and fixes included +in this build. + +## Scope + +This build notes report covers: + +- Version information and commit details +- Changes and new features implemented +- Bugs fixed in this release + +## Generation Source + +This report is automatically generated by the BuildMark tool, analyzing the +Git repository history and issue tracking information. It serves as evidence of +changes and improvements included in this release. + +## Audience + +This document is intended for: + +- Software developers working on TestResults +- Users evaluating what has changed in this release +- Project stakeholders tracking progress +- Contributors understanding recent changes diff --git a/docs/buildnotes/title.txt b/docs/buildnotes/title.txt new file mode 100644 index 0000000..54ba427 --- /dev/null +++ b/docs/buildnotes/title.txt @@ -0,0 +1,14 @@ +--- +title: TestResults +subtitle: Build Notes +author: DEMA Consulting +description: Build notes for the TestResults library +lang: en-US +keywords: + - TestResults + - Build Notes + - Release Notes + - C# + - .NET + - Documentation +---