From 37ceaf33698178e3b1175dcc58982d37439a8430 Mon Sep 17 00:00:00 2001 From: Kfir Strikovsky Date: Mon, 19 Jan 2026 15:11:08 +0200 Subject: [PATCH 1/5] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..6d303b20d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [Unreleased] From 6c92367d209c81c07e981eb68ec388e65f45edd6 Mon Sep 17 00:00:00 2001 From: Kfir Strikovsky Date: Mon, 19 Jan 2026 15:11:44 +0200 Subject: [PATCH 2/5] Changelog From 4237933a258e7f6e7f3620e4d5c00012e0fd1f08 Mon Sep 17 00:00:00 2001 From: Kfir Strikovsky Date: Mon, 19 Jan 2026 15:27:23 +0200 Subject: [PATCH 3/5] change log automation --- .github/workflows/manual-publish.yml | 72 +++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index 59a432e5b..1120fd0ee 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -18,6 +18,11 @@ on: required: false default: false type: boolean + update_changelog: + description: "Update CHANGELOG.md with release notes" + required: false + default: true + type: boolean jobs: publish: @@ -73,6 +78,68 @@ jobs: npm version ${{ github.event.inputs.version }} --no-git-tag-version echo "NEW_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV + - name: Get previous release tag + id: prev-tag + run: | + PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") + echo "tag=$PREV_TAG" >> $GITHUB_OUTPUT + echo "Previous tag: $PREV_TAG" + + - name: Generate Changelog + if: github.event.inputs.update_changelog == 'true' && github.event.inputs.dry_run == 'false' && steps.prev-tag.outputs.tag != '' + uses: anthropics/claude-code-action@v1 + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + prompt: | + Generate a changelog entry for version ${{ env.NEW_VERSION }} (release date: today). + Previous version tag: ${{ steps.prev-tag.outputs.tag }} + + ## Instructions + + 1. Get commits since last release: + `git log ${{ steps.prev-tag.outputs.tag }}..HEAD --pretty=format:"%s (%h)" --no-merges` + + 2. Get merged PRs (for better context): + `gh pr list --state merged --base main --json number,title,body,mergedAt --limit 100` + + 3. Analyze and categorize changes using these categories (only include sections that have changes): + - **Added** - new features + - **Changed** - changes in existing functionality + - **Deprecated** - soon-to-be removed features + - **Removed** - now removed features + - **Fixed** - bug fixes + - **Security** - vulnerability fixes + + 4. Update CHANGELOG.md by inserting the new version entry AFTER the `## [Unreleased]` line. + + ## Important Rules + + - **EXCLUDE** any commits/PRs related to: + - Changelog updates (commits mentioning "changelog", "CHANGELOG") + - Version bumps (commits like "chore: bump version to X.X.X") + - Release commits (commits like "chore: release vX.X.X") + - Be concise but descriptive - focus on user-facing changes + - Include PR numbers in parentheses when available, e.g., "Added foo feature (#123)" + - Follow keepachangelog.com format exactly + - Use ISO date format: YYYY-MM-DD + + ## Example Output Format + + ```markdown + ## [0.0.8] - 2026-01-19 + + ### Added + - Non-interactive mode for `create` command (#67) + + ### Changed + - Improved intro/outro alignment across all commands (#61) + + ### Fixed + - Various small fixes and improvements (#60) + ``` + + claude_args: '--allowed-tools "Bash(git log:*),Bash(git diff:*),Bash(gh pr:*),Read,Write"' + - name: Build package run: npm run build @@ -99,7 +166,9 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add package.json package-lock.json - git commit -m "chore: bump version to ${{ env.NEW_VERSION }}" + # Add CHANGELOG.md only if it was updated + git add CHANGELOG.md 2>/dev/null || true + git commit -m "chore: release v${{ env.NEW_VERSION }}" git tag v${{ env.NEW_VERSION }} git push origin HEAD:${{ github.ref }} git push origin v${{ env.NEW_VERSION }} @@ -131,4 +200,5 @@ jobs: permissions: contents: write packages: write + pull-requests: read id-token: write From c709729a7cdd2ae7a7a193dc6d1aae52c970195c Mon Sep 17 00:00:00 2001 From: Kfir Strikovsky Date: Mon, 19 Jan 2026 15:30:01 +0200 Subject: [PATCH 4/5] bump package --- .github/workflows/manual-publish.yml | 6 ++++-- package-lock.json | 8 ++++---- package.json | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index 1120fd0ee..d31e3a4f9 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -166,8 +166,10 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add package.json package-lock.json - # Add CHANGELOG.md only if it was updated - git add CHANGELOG.md 2>/dev/null || true + # Add CHANGELOG.md only if changelog update was requested + if [[ "${{ github.event.inputs.update_changelog }}" == "true" ]]; then + git add CHANGELOG.md 2>/dev/null || true + fi git commit -m "chore: release v${{ env.NEW_VERSION }}" git tag v${{ env.NEW_VERSION }} git push origin HEAD:${{ github.ref }} diff --git a/package-lock.json b/package-lock.json index ba05dec8c..d9c2163c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "ky": "^1.14.2", "lodash.kebabcase": "^4.1.1", "p-wait-for": "^6.0.0", - "tar": "^7.4.3", + "tar": "^7.5.3", "tsdown": "^0.12.4", "tsx": "^4.19.2", "typescript": "^5.7.2", @@ -6131,9 +6131,9 @@ } }, "node_modules/tar": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz", - "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.3.tgz", + "integrity": "sha512-ENg5JUHUm2rDD7IvKNFGzyElLXNjachNLp6RaGf4+JOgxXHkqA+gq81ZAMCUmtMtqBsoU62lcp6S27g1LCYGGQ==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { diff --git a/package.json b/package.json index 33ba8224a..d641cc97f 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "ky": "^1.14.2", "lodash.kebabcase": "^4.1.1", "p-wait-for": "^6.0.0", - "tar": "^7.4.3", + "tar": "^7.5.3", "tsdown": "^0.12.4", "tsx": "^4.19.2", "typescript": "^5.7.2", From c0f41e3911e2c0442bb17ecdcb1acd32ccdfaefa Mon Sep 17 00:00:00 2001 From: Kfir Strikovsky Date: Mon, 19 Jan 2026 15:48:29 +0200 Subject: [PATCH 5/5] small fixes --- .github/workflows/manual-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index d31e3a4f9..529447ce3 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -100,7 +100,7 @@ jobs: `git log ${{ steps.prev-tag.outputs.tag }}..HEAD --pretty=format:"%s (%h)" --no-merges` 2. Get merged PRs (for better context): - `gh pr list --state merged --base main --json number,title,body,mergedAt --limit 100` + `gh pr list --state merged --json number,title,body,mergedAt --limit 100` 3. Analyze and categorize changes using these categories (only include sections that have changes): - **Added** - new features @@ -168,7 +168,7 @@ jobs: git add package.json package-lock.json # Add CHANGELOG.md only if changelog update was requested if [[ "${{ github.event.inputs.update_changelog }}" == "true" ]]; then - git add CHANGELOG.md 2>/dev/null || true + git add CHANGELOG.md fi git commit -m "chore: release v${{ env.NEW_VERSION }}" git tag v${{ env.NEW_VERSION }}