Skip to content

Commit 2a6349d

Browse files
nanotaboadaclaude
andcommitted
ci(cd): verify tag commit is reachable from master (#439)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 295043c commit 2a6349d

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/dotnet-cd.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727

28+
- name: Verify tag commit is reachable from master
29+
run: |
30+
if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
31+
echo "❌ Error: Tag commit ${{ github.sha }} is not reachable from origin/master"
32+
echo "Ensure the PR is merged to master before pushing a release tag"
33+
exit 1
34+
fi
35+
echo "✅ Verified: commit is reachable from master"
36+
2837
- name: Extract version from tag
2938
id: version
3039
run: |

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ This project uses famous football stadiums (A-Z) that hosted FIFA World Cup matc
5252

5353
### Changed
5454

55+
- Add "Verify tag commit is reachable from master" step to CD workflow using `git merge-base --is-ancestor` before any build or publish steps (#439)
56+
5557
### Fixed
5658

5759
- `GET /players` now returns `200 OK` with an empty list `[]` when no players exist, instead of `404 Not Found` (#425)

0 commit comments

Comments
 (0)