Skip to content

feat: implement tag-based deployment with stadium release names (#356)#357

Merged
nanotaboada merged 4 commits intomasterfrom
feat/named-releases-tag-deployments
Jan 22, 2026
Merged

feat: implement tag-based deployment with stadium release names (#356)#357
nanotaboada merged 4 commits intomasterfrom
feat/named-releases-tag-deployments

Conversation

@nanotaboada
Copy link
Copy Markdown
Owner

@nanotaboada nanotaboada commented Jan 22, 2026

  • Rename dotnet.yml to dotnet-ci.yml and remove container publishing
  • Create dotnet-cd.yml workflow triggered by version tags (v*..-*)
  • Add CHANGELOG.md with A-Z stadium list and release template
  • Update README.md with release instructions and docker pull examples
  • Separate CI (build/test) from CD (publish packages on tags only)

Summary by CodeRabbit

  • New Features

    • Automated stadium-themed release workflow that builds, tests, generates changelogs, creates releases, and publishes Docker images (tags: latest, semantic version, stadium)
  • Documentation

    • Added detailed CHANGELOG and release guide with stadium naming, examples, and templates
    • Updated README with Releases guidance and image pull instructions (Releases content duplicated)
  • Chores

    • Streamlined CI by removing a redundant image-publishing job and consolidating publishing into the release workflow

✏️ Tip: You can customize this high-level summary in your review settings.

- Rename dotnet.yml to dotnet-ci.yml and remove container publishing
- Create dotnet-cd.yml workflow triggered by version tags (v*.*.*-*)
- Add CHANGELOG.md with A-Z stadium list and release template
- Update README.md with release instructions and docker pull examples
- Separate CI (build/test) from CD (publish packages on tags only)
@nanotaboada nanotaboada linked an issue Jan 22, 2026 that may be closed by this pull request
15 tasks
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 22, 2026

Walkthrough

Adds a tag-triggered CD workflow (.github/workflows/dotnet-cd.yml) that parses tags into semver/stadium, runs .NET build/test, builds and pushes Docker images to GHCR with multiple tags, generates a changelog, and creates a GitHub Release. Removes Docker publish job and PACKAGE_NAME from CI workflow. Adds CHANGELOG.md and README release docs.

Changes

Cohort / File(s) Summary
New CD workflow
\.github/workflows/dotnet-cd.yml
New tag-triggered release workflow (tags v*.*.*-*) that extracts tag_name, semver, stadium; validates inputs; sets up .NET, restores, builds (Release), runs tests; logs into GHCR, sets up Buildx, builds & pushes Docker images (tags: latest, semver, stadium); generates changelog.txt by comparing tags; creates a GitHub Release with changelog and image pull instructions.
CI workflow edits
\.github/workflows/dotnet-ci.yml
Removed top-level PACKAGE_NAME env and deleted the container job that previously built/pushed Docker images; CI now focuses on build/test.
Changelog added
CHANGELOG.md
New changelog documenting stadium-based release naming, A–Z stadium mapping table, “How to Release” steps, example commands, and a release template.
README updates
README.md
Added Releases section (stadium naming v{SEMVER}-{STADIUM}), release/tagging instructions, Docker pull examples, updated TOC and CI badge; Releases content also duplicated in Docker area.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer (git tag)
    participant GH as GitHub Actions
    participant Runner as Actions Runner
    participant DotNet as dotnet (restore/build/test)
    participant Docker as Docker/Buildx
    participant GHCR as GitHub Container Registry
    participant Release as GitHub Release

    Dev->>GH: push tag vX.Y.Z-STADIUM
    GH->>Runner: trigger dotnet-cd.yml
    Runner->>DotNet: restore → build (Release) → test
    Runner->>Docker: build images (Buildx)
    Docker->>GHCR: push images (tags: latest, semver, stadium)
    Runner->>Runner: generate changelog (compare tags)
    Runner->>Release: create GitHub Release with changelog and image pull commands
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title follows Conventional Commits format (feat:), is under 80 characters (70 characters), and clearly describes the main change: implementing tag-based deployment with stadium-themed release naming.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/named-releases-tag-deployments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Jan 22, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (66b2e52) 1721 536 31.14%
Head commit (eefbfbf) 1721 (+0) 536 (+0) 31.14% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#357) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In @.github/workflows/dotnet-cd.yml:
- Around line 87-103: The changelog step (id: changelog) generates changelog.txt
but never sets a step output, so steps.changelog.outputs.changelog is empty;
after computing CHANGELOG (and/or writing changelog.txt) write the changelog to
$GITHUB_OUTPUT so it becomes a step output named "changelog" (use the multiline
form to preserve newlines), e.g. emit a heredoc to $GITHUB_OUTPUT that assigns
the "changelog" output from the CHANGELOG variable so subsequent steps can
reference steps.changelog.outputs.changelog.

In `@CHANGELOG.md`:
- Line 10: The opening claim "This project uses famous football stadiums (A-Z)
that hosted FIFA World Cup matches:" is inconsistent with the entry "Xiamen
Egret Stadium (famous fallback)"; either relax the header to allow non-World-Cup
exceptions (e.g., add "or notable/fallback stadiums") or replace the X entry
with a true World Cup stadium name; update the header text or change "Xiamen
Egret Stadium (famous fallback)" to a confirmed World Cup host (keeping the A–Z
scheme) so the document is consistent.
- Line 29: The tag for Parc des Princes is incorrect: replace the identifier
`parcdesprince` with `parcdesprinces` in the table row containing "| P | Parc
des Princes | France (1938, 1998) | `parcdesprince` |" so the tag correctly
reflects the stadium name; update the backticked tag token only, preserving the
rest of the table row and formatting.

Comment thread .github/workflows/dotnet-cd.yml
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
- Add changelog multiline output to $GITHUB_OUTPUT for release body
- Update CHANGELOG header to acknowledge non-World Cup fallback stadium
- Correct Parc des Princes tag from parcdesprince to parcdesprinces
- Restore missing GitHub Release step header in CD workflow
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a 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

🤖 Fix all issues with AI agents
In @.github/workflows/dotnet-cd.yml:
- Around line 28-44: The tag extraction step (variables TAG_NAME, SEMVER,
STADIUM in the "Extract version from tag" run block) must validate parsed values
and fail fast for malformed tags: after computing SEMVER and STADIUM, check that
SEMVER matches the expected semver pattern and STADIUM is non-empty; if either
check fails, emit a clear error message and exit non‑zero instead of writing
outputs, otherwise export tag_name, semver and stadium as before. Ensure the
validation occurs before any echo "semver=..." or "stadium=..." >>
$GITHUB_OUTPUT so invalid tags cannot produce bad Docker tags.

Comment thread .github/workflows/dotnet-cd.yml
- Add validation for stadium names against official A-Z list from CHANGELOG.md
- Validate semver format matches X.Y.Z pattern
- Fail fast with helpful error messages before writing outputs
- Prevent invalid tags like v1.0.0-aztec or v1.0.0-foobar from proceeding
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a 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

🤖 Fix all issues with AI agents
In @.github/workflows/dotnet-cd.yml:
- Around line 138-170: The release step using softprops/action-gh-release
currently sets both a custom body including ${{
steps.changelog.outputs.changelog }} and generate_release_notes: true, causing
duplicate changelog content; update the Create GitHub Release step
(softprops/action-gh-release) to either remove ${{
steps.changelog.outputs.changelog }} from the body when keeping
generate_release_notes: true, or set generate_release_notes: false if you want
to keep the custom body, and ensure the tag_name/name fields remain unchanged.
🧹 Nitpick comments (3)
.github/workflows/dotnet-cd.yml (3)

11-13: Consider adding .NET CLI environment flags for cleaner logs.

Based on learnings, adding DOTNET_NOLOGO: true and DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 suppresses the .NET welcome message and logo output, resulting in cleaner CI logs.

♻️ Suggested improvement
 env:
   DOTNET_VERSION: 8.0.x
   PACKAGE_NAME: nanotaboada/dotnet-samples-aspnetcore-webapi
+  DOTNET_NOLOGO: true
+  DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

46-61: Hardcoded stadium list creates maintenance burden.

The VALID_STADIUMS list is duplicated from CHANGELOG.md. If the source of truth in CHANGELOG.md changes, this workflow must be manually updated, risking drift.

Consider extracting the list dynamically from CHANGELOG.md or documenting the synchronization requirement clearly. For now, this is acceptable if releases are infrequent.


23-26: Consider using the floating v6 tag instead of a specific patch version.

actions/checkout@v6.0.1 is valid, but pinning to a specific patch version (v6.0.1) means you won't receive automatic security updates. The latest major version is v6, and best practice is to use actions/checkout@v6 to ensure patches are applied automatically. The fetch-depth: 0 setting is correctly configured for full history access.

Comment thread .github/workflows/dotnet-cd.yml
- Remove manual git log changelog from release body
- Rely on generate_release_notes for auto-generated changelog
- Keep custom Docker pull instructions in body
- Avoid duplicate/conflicting changelog content
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Implement Named Releases with Tag-Based Deployment

1 participant