Skip to content

Commit 5370b16

Browse files
committed
docs: standardize release workflow and improve documentation quality
- Add comprehensive Release Management section to AGENTS.md - Document CHANGELOG-first release workflow (3-step process) - Add XML documentation comments to all model properties - Reframe Features section to highlight reference project value - Reorder features by development lifecycle importance
1 parent bc51129 commit 5370b16

7 files changed

Lines changed: 266 additions & 41 deletions

File tree

.github/workflows/dotnet-cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ jobs:
138138
- name: Create GitHub Release
139139
uses: softprops/action-gh-release@v2.5.0
140140
with:
141-
name: "v${{ steps.version.outputs.semver }} - ${{ steps.version.outputs.stadium }}"
141+
name: "v${{ steps.version.outputs.semver }} - ${{ steps.version.outputs.stadium }} 🏟️"
142142
tag_name: ${{ steps.version.outputs.tag_name }}
143143
body: |
144-
# 🏟️ Release ${{ steps.version.outputs.semver }} - ${{ steps.version.outputs.stadium }}
144+
#Release ${{ steps.version.outputs.semver }} - ${{ steps.version.outputs.stadium }} 🏟️
145145
146146
## Docker Images
147147

AGENTS.md

Lines changed: 67 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ dotnet build && dotnet test
8181

8282
**Pre-commit checklist**:
8383

84-
1. Run `dotnet build --configuration Release` - must build successfully
85-
2. Run `dotnet test` - all tests must pass
86-
3. Check code formatting and style
84+
1. Update CHANGELOG.md `[Unreleased]` section with your changes (Added/Changed/Fixed/Removed)
85+
2. Run `dotnet build --configuration Release` - must build successfully
86+
3. Run `dotnet test` - all tests must pass
87+
4. Check code formatting and style
88+
5. Follow conventional commit format (enforced by commitlint)
8789

8890
### Running the Application
8991

@@ -153,6 +155,66 @@ curl http://localhost:5000/health
153155

154156
**First run behavior**: Container initializes SQLite database with seed data. Volume persists data between runs.
155157

158+
## Release Management
159+
160+
### CHANGELOG Maintenance
161+
162+
**Important**: Update CHANGELOG.md continuously as you work, not just before releases.
163+
164+
**For every meaningful commit**:
165+
166+
1. Add your changes to the `[Unreleased]` section in CHANGELOG.md
167+
2. Categorize under the appropriate heading:
168+
- **Added**: New features
169+
- **Changed**: Changes in existing functionality
170+
- **Deprecated**: Soon-to-be removed features
171+
- **Removed**: Removed features
172+
- **Fixed**: Bug fixes
173+
- **Security**: Security vulnerability fixes
174+
3. Use clear, user-facing descriptions (not just commit messages)
175+
4. Include PR/issue numbers when relevant (#123)
176+
177+
**Example**:
178+
179+
```markdown
180+
## [Unreleased]
181+
182+
### Added
183+
- User authentication with JWT tokens (#145)
184+
- Rate limiting middleware for API endpoints
185+
186+
### Deprecated
187+
- Legacy authentication endpoint /api/v1/auth (use /api/v2/auth instead)
188+
189+
### Fixed
190+
- Null reference exception in player service (#147)
191+
192+
### Security
193+
- Fix SQL injection vulnerability in search endpoint (#148)
194+
```
195+
196+
### Creating a Release
197+
198+
When ready to release:
199+
200+
1. **Update CHANGELOG.md**: Move items from `[Unreleased]` to a new versioned section:
201+
202+
```markdown
203+
## [1.1.0 - bernabeu] - 2026-02-15
204+
```
205+
206+
2. **Commit and push** CHANGELOG changes
207+
3. **Create and push tag**:
208+
209+
```bash
210+
git tag -a v1.1.0-bernabeu -m "Release 1.1.0 - Bernabéu"
211+
git push origin v1.1.0-bernabeu
212+
```
213+
214+
4. **CD workflow runs automatically** to publish Docker images and create GitHub Release
215+
216+
See [CHANGELOG.md](CHANGELOG.md#how-to-release) for complete release instructions and stadium naming convention.
217+
156218
## CI/CD Pipeline
157219

158220
### Continuous Integration (dotnet.yml)
@@ -165,7 +227,7 @@ curl http://localhost:5000/health
165227
2. **Restore**: `dotnet restore` with dependency caching
166228
3. **Build**: `dotnet build --no-restore --configuration Release`
167229
4. **Test**: `dotnet test --no-build --verbosity normal --settings .runsettings`
168-
5. **Coverage**: Upload coverage reports to Codecov and Codacy
230+
5. **Coverage**: Upload coverage reports to Codecov
169231

170232
**Local validation** (run this before pushing):
171233

@@ -384,6 +446,7 @@ curl -X DELETE https://localhost:9000/players/1 -k
384446

385447
## Important Notes
386448

449+
- **CHANGELOG maintenance**: Update CHANGELOG.md `[Unreleased]` section with every meaningful change
387450
- **Never commit secrets**: No API keys, tokens, or credentials in code
388451
- **Test coverage**: Maintain high coverage with xUnit tests
389452
- **Commit messages**: Follow conventional commits (enforced by commitlint in CI)

CHANGELOG.md

Lines changed: 82 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,87 @@ This project uses famous football stadiums (A-Z) that hosted FIFA World Cup matc
4444

4545
### Added
4646

47+
- Token efficiency strategy for Copilot/AI agents with optimized instruction loading and improved token counting script (#364)
48+
4749
### Changed
4850

49-
### Fixed
51+
- Bump Swashbuckle.AspNetCore from 10.1.0 to 10.1.2
52+
- Bump docker/login-action from 3.6.0 to 3.7.0
53+
- Bump softprops/action-gh-release from 2.2.0 to 2.5.0
54+
- Bump actions/checkout from 6.0.1 to 6.0.2
55+
56+
### Deprecated
5057

5158
### Removed
5259

60+
### Fixed
61+
62+
### Security
63+
64+
---
65+
66+
## [1.0.0 - azteca] - 2026-01-22
67+
68+
Initial release. See [README.md](README.md) for complete feature list and documentation.
69+
5370
---
5471

5572
## How to Release
5673

57-
To create a new release:
74+
To create a new release, follow these steps in order:
75+
76+
### 1. Update CHANGELOG.md
77+
78+
Move items from the `[Unreleased]` section to a new release section:
79+
80+
```markdown
81+
## [X.Y.Z - STADIUM_NAME] - YYYY-MM-DD
82+
83+
### Added
84+
- New features here
85+
86+
### Changed
87+
- Changes here
88+
89+
### Fixed
90+
- Bug fixes here
91+
92+
### Removed
93+
- Removed features here
94+
```
95+
96+
**Important:** Commit and push this change before creating the tag.
97+
98+
### 2. Create and Push Version Tag
99+
100+
```bash
101+
git tag -a vX.Y.Z-stadium -m "Release X.Y.Z - Stadium"
102+
git push origin vX.Y.Z-stadium
103+
```
104+
105+
Example:
106+
107+
```bash
108+
git tag -a v1.0.0-azteca -m "Release 1.0.0 - Azteca"
109+
git push origin v1.0.0-azteca
110+
```
111+
112+
### 3. Automated CD Workflow
113+
114+
The CD workflow automatically:
58115

59-
1. Update this CHANGELOG with release notes under the appropriate version heading
60-
2. Create and push a version tag with stadium name:
116+
- ✅ Validates the stadium name against the A-Z list
117+
- ✅ Builds and tests the project in Release configuration
118+
- ✅ Publishes Docker images to GHCR with three tags (`:X.Y.Z`, `:stadium`, `:latest`)
119+
- ✅ Creates a GitHub Release with auto-generated notes from commits
61120

62-
```bash
63-
git tag -a v1.0.0-azteca -m "Release 1.0.0 - Azteca"
64-
git push origin v1.0.0-azteca
65-
```
121+
### Pre-Release Checklist
66122

67-
3. The CD workflow will automatically:
68-
- Build and test the project
69-
- Publish Docker images to GHCR with three tags (`:1.0.0`, `:azteca`, `:latest`)
70-
- Create a GitHub Release with auto-generated notes
123+
- [ ] CHANGELOG.md updated with release notes
124+
- [ ] CHANGELOG.md changes committed and pushed
125+
- [ ] Tag created with correct format: `vX.Y.Z-stadium`
126+
- [ ] Stadium name is valid (A-Z from table above)
127+
- [ ] Tag pushed to trigger CD workflow
71128

72129
---
73130

@@ -81,10 +138,21 @@ To create a new release:
81138
### Changed
82139
- Changes in existing functionality
83140
84-
### Fixed
85-
- Bug fixes
141+
### Deprecated
142+
- Soon-to-be removed features
86143
87144
### Removed
88145
- Removed features
89146
147+
### Fixed
148+
- Bug fixes
149+
150+
### Security
151+
- Security vulnerability fixes
152+
90153
-->
154+
155+
---
156+
157+
[unreleased]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v1.0.0-azteca...HEAD
158+
[1.0.0 - azteca]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/releases/tag/v1.0.0-azteca

README.md

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[![.NET CD](https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/actions/workflows/dotnet-cd.yml/badge.svg)](https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/actions/workflows/dotnet-cd.yml)
55
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nanotaboada_Dotnet.Samples.AspNetCore.WebApi&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=nanotaboada_Dotnet.Samples.AspNetCore.WebApi)
66
[![Build Status](https://dev.azure.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/_apis/build/status%2FDotnet.Samples.AspNetCore.WebApi?branchName=master)](https://dev.azure.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/_build/latest?definitionId=14&branchName=master)
7-
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ac7b7e22f1cd4d9d9233b36982b0d6a9)](https://app.codacy.com/gh/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
87
[![codecov](https://codecov.io/gh/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/graph/badge.svg?token=hgJc1rStJ9)](https://codecov.io/gh/nanotaboada/Dotnet.Samples.AspNetCore.WebApi)
98
[![CodeFactor](https://www.codefactor.io/repository/github/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/badge)](https://www.codefactor.io/repository/github/nanotaboada/Dotnet.Samples.AspNetCore.WebApi)
109
[![License: MIT](https://img.shields.io/badge/License-MIT-white.svg)](https://opensource.org/licenses/MIT)
@@ -30,18 +29,14 @@ Proof of Concept for a RESTful API built with .NET 8 (LTS) and ASP.NET Core. Man
3029

3130
## Features
3231

33-
- 🔌 RESTful CRUD operations for football player data
34-
- 📚 Interactive API documentation
35-
- 🚦 Fixed window rate limiting
36-
- ⌨️ Input validation
37-
- ⚡ In-memory caching (1-hour TTL)
38-
- 💿 Relational database with ORM
39-
- 🏗️ Layered architecture pattern
40-
- ⌛ Asynchronous operations throughout
41-
- 📝 Structured logging to console and file
42-
- 🩺 Health check endpoint for monitoring
43-
- 🐳 Full containerization support
44-
- ✅ Comprehensive unit tests
32+
- 🏗️ **Clean layered architecture** - Repository pattern, dependency injection, and async operations throughout
33+
- 📚 **Interactive API exploration** - Swagger UI documentation with health monitoring endpoints
34+
-**Performance optimizations** - In-memory caching, rate limiting, and efficient database queries
35+
- 🧪 **High test coverage** - xUnit tests with automated reporting to Codecov and SonarCloud
36+
- 📖 **Token-efficient documentation** - AGENTS.md + auto-loaded Copilot instructions for AI-assisted development
37+
- 🐳 **Full containerization** - Multi-stage Docker builds with Docker Compose orchestration
38+
- 🔄 **Complete CI/CD pipeline** - Automated testing, code quality checks, Docker publishing, and GitHub releases
39+
- 🏟️ **Stadium-themed semantic versioning** - Memorable, alphabetical release names from World Cup venues
4540

4641
## Tech Stack
4742

@@ -190,7 +185,7 @@ graph TB
190185

191186
Interactive API documentation is available via Swagger UI at `https://localhost:9000/swagger/index.html` when the server is running.
192187

193-
> 💡 **Note:** Swagger documentation is only available in development mode for security reasons.
188+
> 💡 Swagger documentation is only available in development mode for security reasons.
194189
195190
**Quick Reference:**
196191

@@ -273,7 +268,7 @@ docker compose build
273268
docker compose up
274269
```
275270

276-
> 💡 **Note:** On first run, the container copies a pre-seeded SQLite database into a persistent volume. On subsequent runs, that volume is reused and the data is preserved.
271+
> 💡 On first run, the container copies a pre-seeded SQLite database into a persistent volume. On subsequent runs, that volume is reused and the data is preserved.
277272
278273
### Stop the application
279274

@@ -304,18 +299,39 @@ Releases follow the pattern: `v{SEMVER}-{STADIUM}` (e.g., `v1.0.0-azteca`)
304299

305300
### Create a Release
306301

307-
To create a new release, tag a commit and push the tag:
302+
To create a new release, follow this workflow:
303+
304+
#### 1. Update CHANGELOG.md
305+
306+
First, document your changes in [CHANGELOG.md](CHANGELOG.md):
307+
308+
```bash
309+
# Move items from [Unreleased] to new release section
310+
# Example: [1.0.0 - azteca] - 2026-01-22
311+
git add CHANGELOG.md
312+
git commit -m "docs: prepare changelog for v1.0.0-azteca release"
313+
git push
314+
```
315+
316+
#### 2. Create and Push Tag
317+
318+
Then create and push the version tag:
308319

309320
```bash
310321
git tag -a v1.0.0-azteca -m "Release 1.0.0 - Azteca"
311322
git push origin v1.0.0-azteca
312323
```
313324

325+
#### 3. Automated CD Workflow
326+
314327
This triggers the CD workflow which automatically:
315328

316-
1. Builds and tests the project in Release configuration
317-
2. Publishes Docker images to GitHub Container Registry with three tags
318-
3. Creates a GitHub Release with auto-generated changelog
329+
1. Validates the stadium name
330+
2. Builds and tests the project in Release configuration
331+
3. Publishes Docker images to GitHub Container Registry with three tags
332+
4. Creates a GitHub Release with auto-generated changelog from commits
333+
334+
> 💡 Always update CHANGELOG.md before creating the tag. See [CHANGELOG.md](CHANGELOG.md#how-to-release) for detailed release instructions.
319335
320336
### Pull Docker Images
321337

@@ -332,7 +348,7 @@ docker pull ghcr.io/nanotaboada/dotnet-samples-aspnetcore-webapi:azteca
332348
docker pull ghcr.io/nanotaboada/dotnet-samples-aspnetcore-webapi:latest
333349
```
334350

335-
> 💡 **Note:** See [CHANGELOG.md](CHANGELOG.md) for the complete stadium list (A-Z) and release history.
351+
> 💡 See [CHANGELOG.md](CHANGELOG.md) for the complete stadium list (A-Z) and release history.
336352
337353
## Environment Variables
338354

@@ -366,7 +382,7 @@ For containerized production deployment:
366382
STORAGE_PATH=/storage/players-sqlite3.db
367383
```
368384

369-
> 💡 **Note:** Additional environment variables (`ASPNETCORE_ENVIRONMENT=Production` and `ASPNETCORE_URLS=http://+:9000`) are set in the `Dockerfile`.
385+
> 💡 Additional environment variables (`ASPNETCORE_ENVIRONMENT=Production` and `ASPNETCORE_URLS=http://+:9000`) are set in the `Dockerfile`.
370386
371387
## Command Summary
372388

0 commit comments

Comments
 (0)