-
Notifications
You must be signed in to change notification settings - Fork 259
ci: Fix versioning in package deployment (v3) #1305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
Files not reviewed (1)
- .vscode/settings.json: Language not supported
Steps to add locally:
|
Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
- Remove 'NO_ENVIRONMENT' fallback to avoid invalid environment creation - Update GitVersion config to use proper tag/label configuration - Remove duplicate .NET setup steps - Export GitVersion variables to environment for proper version composition - Update GitVersion tool to latest version - Simplify workflow outputs and summaries - Fix environment condition for deploy job
…ag' property - GitVersion 6.x replaced 'tag' with 'label' property - This fixes the configuration parsing error in the workflow - Now generates correct version: 3.0.0-preview.2
Warning Rate limit exceeded@DaveSkender has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 19 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughThe updates introduce enhanced GitVersion configuration, restructure the deployment workflow by separating validation and packaging into distinct jobs, add the GitHub Copilot Chat extension to the devcontainer, and update Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant GitHub Actions
participant GitVersion
participant NuGet
Developer->>GitHub Actions: Push/dispatch workflow
GitHub Actions->>GitVersion: Validate configuration (validate job)
GitHub Actions->>GitVersion: Generate version info (package job)
GitHub Actions->>NuGet: Publish package (deploy job, if not dry-run)
GitHub Actions-->>Developer: Outputs summary and release notes
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (4)
.devcontainer/devcontainer.json (1)
45-47
: Pin extension versions for reproducible dev-containers.
Leaving extensions unpinned means every rebuild can silently pull a newer (and potentially incompatible) release. To keep builds deterministic, consider specifying explicit versions:"extensions": [ "ms-dotnettools.csdevkit", - "DavidAnson.vscode-markdownlint", - "GitHub.copilot-chat" + "DavidAnson.vscode-markdownlint@0.51.0", + "GitHub.copilot-chat@0.14.0" ](Hard-code whatever current versions you validate with.)
src/gitversion.yml (2)
13-18
: Main branch rule: consider explicitincrement: None
Currently
main
incrementsPatch
, which will tick the patch number on every commit even for documentation-only changes.
If semantic bumping is already controlled via commit messages (+semver:
tags configured above), you can set:main: increment: Noneand let the commit messages (or release branches) drive version bumps, eliminating noisy patch revs.
31-38
: Missingsource-branches
for pull-request / unknown sections may break inheritanceGitVersion 6 infers
source-branches
but emits warnings when they are absent. Add explicit lists if you want clean diagnostics:pull-request: increment: Inherit source-branches: [feature, main, release] label: previewSame for
unknown
..github/workflows/deploy-package.yml (1)
118-122
: Tool installation duplicated – cache the global install
dotnet tool install --global GitVersion.Tool
is executed in bothvalidate
andpackage
jobs. Installing once in the shared setup action (or caching withactions/cache
) will shave ≈4–5 s per job.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.devcontainer/devcontainer.json
(1 hunks).github/workflows/deploy-package.yml
(6 hunks).gitignore
(1 hunks)src/gitversion.yml
(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
.gitignore (1)
Learnt from: CR
PR: DaveSkender/Stock.Indicators#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-07-17T05:41:55.020Z
Learning: Applies to src/**/*.cs : Consistent formatting using `.editorconfig`
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (2)
.devcontainer/devcontainer.json (1)
46-46
: Addition of Copilot Chat improves DX – looks good.
The newGitHub.copilot-chat
extension completes the existing chat-related settings and should make AI-assisted development inside the container smoother. No concerns.src/gitversion.yml (1)
39-39
: Root-levellabel: preview
already applies tounknown
– duplication not harmful but redundantBecause
unknown
explicitly setslabel: preview
, keeping the global label is optional.
Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (5)
.github/workflows/deploy-package.yml (5)
64-66
:dotnet gitversion
will not be found with a global tool install
Global installation exposesgitversion
ordotnet-gitversion
, notdotnet gitversion
.
Use one of the exposed executables to avoid a “No executable found matching command” failure.
67-69
:-updateassemblyinfo
pollutes the working tree
The flag rewritesAssemblyInfo
and leaves the repo dirty – unnecessary for CI.
Simply emit JSON (dotnet-gitversion …
) and export variables.
138-144
: Preview number is duplicated in the composed version string
PreReleaseTag
already contains the numeric component (preview.2
).
Appending.${{ env.PreReleaseNumber }}
yieldspreview.2.2
.
Use onlyPreReleaseTag
or just rely onFullSemVer
.
237-238
: Conditional never becomestrue
; publish step is always skipped
env.dry_run
is a string.!env.dry_run
coerces any non-empty string totrue
, then negates tofalse
.
Compare explicitly instead:-if: ${{ !env.dry_run }} +if: ${{ env.dry_run != 'true' }}
245-247
: Same logic bug for release-note gating
The condition has the identical!env.dry_run
issue; the step will never run.
Apply the explicit string comparison here as well.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/deploy-package.yml
(6 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: unit tests (windows-latest, 9.0.x)
- GitHub Check: unit tests (windows-latest, 6.0.x)
- GitHub Check: Analyze (csharp)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com>
Problem: preview version not incrementing (suffix not considered)
Goal: Prerelease “preview” tag from
gitversion.yml
is recognized by GitVersionRef: GitVersion configuration and variables docs
Important
Don't merge here, this is just for troubleshooting v3 preview version numbering generation, without doing any actual deployments. After dry runs are working here, @DaveSkender will manually move code to final in PR #1346
NO PACKAGE DEPLOYMENT DONE HERE WHILE TESTING
Ref: GitVersion configuration and variables docs
To do
-c
instead of-config
for pathworkflow: GitHubFlow/v1
vsTrunkBased/preview1
or othersNO_ENVIRONMENT
is not created, or use “”Acceptance criteria
Version numbers generate correctly for dry runs as:
3.0.0-preview.2
for production preview (pre-release)3.0.0
for production dry runs3.0.0-preview.2-{pr-id}-{run-attempt}
for CI builds (because we havenext-version: 3.0.0
in branchgitversion.yml
Given these published versions as a reference:
Summary by CodeRabbit
Chores
Refactor
New Features