Skip to content

Commit 1865afa

Browse files
committed
fix: add missing CHANGELOG entries and improve release workflow
- Add missing v1.1.0 and v1.2.0 entries to CHANGELOG - Release workflow verifies CHANGELOG entry exists before releasing - Rollback tag automatically if verification fails - Simplify /release skill to only push tag (workflow handles the rest)
1 parent 40ef603 commit 1865afa

3 files changed

Lines changed: 50 additions & 23 deletions

File tree

.claude/skills/release.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
# /release <version>
22

3-
1. Verify CHANGELOG.md has entry for version
4-
2. Extract release notes from CHANGELOG.md (section for this version)
5-
3. Create and push tags:
3+
1. Verify CHANGELOG.md has entry for version (`## [<version>]`)
4+
2. Extract release notes from CHANGELOG for this version
5+
3. Create and push version tag with release notes as message:
66
```bash
7-
git tag -a v<version> -m "Release v<version>"
7+
git tag -a v<version> -m "<release notes from changelog>"
88
git push origin v<version>
9-
git tag -fa v<major> -m "Update v<major> to v<version>"
10-
git push origin v<major> --force
11-
```
12-
4. Create release with notes from changelog:
13-
```bash
14-
gh release create v<version> --title "v<version>" --notes "<notes from changelog>"
159
```
10+
11+
The release workflow handles the rest. We follow [Semantic Versioning](https://semver.org/).

.github/workflows/release.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,23 @@ jobs:
1919
id: version
2020
run: |
2121
TAG=${GITHUB_REF#refs/tags/}
22+
VERSION=${TAG#v}
2223
MAJOR=$(echo "$TAG" | cut -d. -f1)
23-
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
24-
echo "major=$MAJOR" >> "$GITHUB_OUTPUT"
24+
{
25+
echo "tag=$TAG"
26+
echo "version=$VERSION"
27+
echo "major=$MAJOR"
28+
} >> "$GITHUB_OUTPUT"
29+
30+
- name: Verify CHANGELOG entry exists
31+
run: |
32+
VERSION=${{ steps.version.outputs.version }}
33+
if ! grep -q "## \[$VERSION\]" CHANGELOG.md; then
34+
echo "::error::No CHANGELOG entry found for version $VERSION"
35+
echo "::error::Please add a '## [$VERSION]' section to CHANGELOG.md before releasing"
36+
exit 1
37+
fi
38+
echo "Found CHANGELOG entry for version $VERSION"
2539
2640
- name: Create GitHub Release
2741
uses: softprops/action-gh-release@v2
@@ -47,3 +61,11 @@ jobs:
4761
git push origin "$MAJOR"
4862
4963
echo "Updated $MAJOR tag to point to ${{ steps.version.outputs.tag }}"
64+
65+
- name: Rollback tag on failure
66+
if: failure()
67+
run: |
68+
TAG=${{ steps.version.outputs.tag }}
69+
echo "::warning::Rolling back tag $TAG due to workflow failure"
70+
git push origin ":refs/tags/$TAG" 2>/dev/null || true
71+
echo "Tag $TAG has been removed. Fix the issue and push the tag again."

CHANGELOG.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- `.github/dependabot.yml` for automated GitHub Actions updates
1313
- `.gitignore` for local settings and Claude plans
1414
- `.claude/` configuration for AI assistant (coding rules, skills, workflow)
15-
- **deploy** action: PR commenting feature
16-
- Automatically post/update a comment on PRs with the deployment URL
17-
- New inputs: `comment-on-pr`, `github-token`, `comment-header`
18-
- Upsert behavior: updates existing comment instead of creating duplicates
15+
16+
### Changed
17+
- `.pre-commit-config.yaml`: require minimum version 4.5.0
18+
- `CONTRIBUTING.md`: simplify setup with `uv` instead of `pip`
19+
- `release.yml`: verify CHANGELOG entry exists, rollback tag on failure
20+
21+
## [1.2.0] - 2026-01-22
22+
23+
### Added
1924
- **cleanup** action: PR comment update feature
2025
- Update the deploy PR comment to show cleanup status when PR is closed
2126
- New inputs: `update-pr-comment`, `comment-header`
2227
- New output: `pr-comment-updated`
23-
- Changes comment header from "🚀 Preview Deployment" to "🧹 Preview Deployment (Cleaned Up)"
28+
29+
## [1.1.0] - 2026-01-22
30+
31+
### Added
32+
- **deploy** action: PR commenting feature
33+
- Automatically post/update a comment on PRs with the deployment URL
34+
- New inputs: `comment-on-pr`, `github-token`, `comment-header`
35+
- Upsert behavior: updates existing comment instead of creating duplicates
2436
- CI/CD pipeline with ShellCheck, actionlint, and yamllint
2537
- Branch protection and governance files (CODEOWNERS, issue templates, PR template)
2638
- CONTRIBUTING.md with development guidelines
2739
- SECURITY.md with security policy
2840
- Pre-commit hooks configuration
2941

30-
### Changed
31-
- `.pre-commit-config.yaml`: require minimum version 4.5.0
32-
- `CONTRIBUTING.md`: simplify setup with `uv` instead of `pip`
33-
3442
### Fixed
3543
- ShellCheck warnings: properly quoted GITHUB_OUTPUT
3644
- Actionlint configuration to only lint workflow files
3745

38-
## [1.0.0] - 2024-01-01
46+
## [1.0.0] - 2026-01-22
3947

4048
### Added
4149
- Initial release of ZAD Actions
@@ -58,5 +66,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5866
- Secure handling of API keys via environment variables
5967
- Dangerous character detection for container inputs
6068

61-
[Unreleased]: https://github.com/RijksICTGilde/zad-actions/compare/v1.0.0...HEAD
69+
[1.2.0]: https://github.com/RijksICTGilde/zad-actions/releases/tag/v1.2.0
70+
[1.1.0]: https://github.com/RijksICTGilde/zad-actions/releases/tag/v1.1.0
6271
[1.0.0]: https://github.com/RijksICTGilde/zad-actions/releases/tag/v1.0.0

0 commit comments

Comments
 (0)