fix: set publish.yml CommonSource build property to stable BED-7878#211
fix: set publish.yml CommonSource build property to stable BED-7878#211
Conversation
WalkthroughUpdated the CI workflow to upgrade the checkout action from v2 to v6 and modified the dotnet build command to set the CommonLibSource MSBuild property from Release to Stable. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/publish.yml:
- Line 39: The CI uses the wrong MSBuild property name: update the dotnet build
invocation that sets CommonLibSource to instead set CommonSource so the package
selection in Sharphound.csproj (which checks CommonSource) receives the intended
value; locate the dotnet build command (the line with "dotnet build -c ${{
matrix.release.type }} -p:Version=${VERSION:1}") and replace the
-p:CommonLibSource=... with -p:CommonSource=... so the stable/dev selection
works as expected.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 73916b67-f40a-4690-8b7b-8b45de0a36f4
📒 Files selected for processing (1)
.github/workflows/publish.yml
| run: | | ||
| VERSION=${{ github.ref_name }} | ||
| dotnet build -c ${{ matrix.release.type }} -p:Version=${VERSION:1} -p:CommonLibSource=Release | ||
| dotnet build -c ${{ matrix.release.type }} -p:Version=${VERSION:1} -p:CommonLibSource=Stable |
There was a problem hiding this comment.
Use the correct MSBuild property name (CommonSource)
Line 39 sets CommonLibSource, but package version selection in Sharphound.csproj is based on CommonSource (Sharphound.csproj:17-40). As written, this can leave the build on the default dev path instead of stable.
Proposed fix
- dotnet build -c ${{ matrix.release.type }} -p:Version=${VERSION:1} -p:CommonLibSource=Stable
+ dotnet build -c ${{ matrix.release.type }} -p:Version=${VERSION:1} -p:CommonSource=Stable📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| dotnet build -c ${{ matrix.release.type }} -p:Version=${VERSION:1} -p:CommonLibSource=Stable | |
| dotnet build -c ${{ matrix.release.type }} -p:Version=${VERSION:1} -p:CommonSource=Stable |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/publish.yml at line 39, The CI uses the wrong MSBuild
property name: update the dotnet build invocation that sets CommonLibSource to
instead set CommonSource so the package selection in Sharphound.csproj (which
checks CommonSource) receives the intended value; locate the dotnet build
command (the line with "dotnet build -c ${{ matrix.release.type }}
-p:Version=${VERSION:1}") and replace the -p:CommonLibSource=... with
-p:CommonSource=... so the stable/dev selection works as expected.
Description
Publishing should build against SHCommon stable version
Motivation and Context
This PR addresses: BED-7878
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Summary by CodeRabbit