Align CI workflows with .NET 9 release automation#10
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes and restructures the GitHub Actions CI/CD workflows by consolidating and updating existing workflows. The changes replace two older workflows (dotnet.yml and nuget.yml) with two new, more comprehensive workflows (ci.yml and release.yml), and updates several existing workflows to use .NET 9.0 and modern GitHub Actions.
- Introduces a new CI workflow for pull requests with code coverage reporting
- Adds a comprehensive release workflow with automated NuGet publishing and GitHub releases
- Updates all workflows to .NET 9.0.x and latest action versions
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/release.yml |
New automated release workflow with version extraction, NuGet publishing, and GitHub release creation |
.github/workflows/ci.yml |
New CI workflow for PR validation with Codecov integration |
.github/workflows/nuget.yml |
Removed old NuGet workflow in favor of comprehensive release workflow |
.github/workflows/dotnet.yml |
Removed old build/test workflow in favor of new CI workflow |
.github/workflows/codeql-analysis.yml |
Updated to use .NET 9.0, latest action versions, explicit build steps, and improved scheduling |
.github/workflows/mime-sync.yml |
Updated .NET version from 8.0.x to 9.0.x |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| workflow_dispatch: | ||
|
|
||
| env: | ||
| DOTNET_VERSION: '9.0.x' | ||
|
|
||
| jobs: | ||
| build: |
There was a problem hiding this comment.
The release.yml and ci.yml workflows both trigger on push to main branch, which will cause both workflows to run simultaneously on every push to main. This creates duplicate build/test runs and wastes CI resources. Consider removing the push trigger from either release.yml (keeping only workflow_dispatch) or ci.yml to avoid duplication.
| run: dotnet pack --configuration Release --no-build --output ./artifacts | ||
|
|
||
| - name: Upload artifacts | ||
| uses: actions/upload-artifact@v4 |
There was a problem hiding this comment.
Inconsistent artifact action versions: actions/upload-artifact@v4 is used on line 48 but actions/download-artifact@v5 is used on lines 69 and 130. While this may work, it's better practice to use matching major versions for related actions to ensure compatibility. Consider updating upload-artifact to v5.
| uses: actions/upload-artifact@v4 | |
| uses: actions/upload-artifact@v5 |
| fi | ||
| done | ||
|
|
||
| if [ "$PUBLISHED" = true ] || echo "$OUTPUT" | grep -q "Your package was pushed"; then |
There was a problem hiding this comment.
The condition checks for both the PUBLISHED flag and a string match in OUTPUT. However, if PUBLISHED is already set to true when a package publishes successfully (line 99), the additional string check seems redundant. Consider simplifying to just check the PUBLISHED flag or adding a comment explaining why both checks are necessary.
| if [ "$PUBLISHED" = true ] || echo "$OUTPUT" | grep -q "Your package was pushed"; then | |
| if [ "$PUBLISHED" = true ]; then |
| echo "" >> release_notes.md | ||
|
|
||
| echo "### ✨ Features" >> release_notes.md | ||
| git log --pretty=format:"- %s (%h)" $PREVIOUS_TAG..HEAD --grep="^feat" --grep="^feature" >> release_notes.md || true |
There was a problem hiding this comment.
The git log command with multiple --grep options uses OR logic by default, but the --invert-grep on line 195 will not work correctly with multiple grep patterns. The inverted grep will exclude commits matching ANY of the patterns, not ALL of them. This could cause commits to appear in multiple sections or be missing entirely. Consider using --grep with --extended-regexp and a single pattern like --grep='^(feat|feature|fix|bugfix|docs|doc)' for the inverted case.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_6907ace0e620832693e640e96eb2eee6