Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/build-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ name: build-package
on:
push:
branches: [main]
paths-ignore:
- '**.md'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
workflow_dispatch:

# Superseded runs for the same branch are of no interest once a newer commit lands.
Expand Down Expand Up @@ -80,6 +84,33 @@ jobs:
- name: Verify packages
run: ./scripts/verify-packages.sh

- name: Generate Metrics
id: dotnet-code-metrics
uses: dotnet/samples/github-actions/DotNet.GitHubAction@main
with:
owner: ${{ github.repository_owner }}
name: ${{ github.repository }}
branch: ${{ github.ref }}
dir: ${{ './src' }} # Path to your source code directory

- name: Create Pull Request for Metrics
uses: peter-evans/create-pull-request@v5
if: ${{ steps.dotnet-code-metrics.outputs.updated-metrics == 'true' && github.ref == 'refs/heads/main' }}
with:
title: '${{ steps.dotnet-code-metrics.outputs.summary-title }}'
body: '${{ steps.dotnet-code-metrics.outputs.summary-details }}'
commit-message: 'docs: automated .NET code metrics update'
branch: dotnet-code-metrics-updates
base: main

- name: Upload Metrics Artifact
uses: actions/upload-artifact@v4
with:
name: dot-net-code-metrics-report
path: |
**/CODE_METRICS.md
retention-days: 14

# The badge lives on an orphan branch so README can link to a stable raw URL without
# adding commit noise to main.
- name: Publish coverage badge
Expand Down
Loading