Skip to content

Commit 463ac5c

Browse files
authored
Fix changelog (#1791)
1 parent bba9488 commit 463ac5c

File tree

3 files changed

+7
-91
lines changed

3 files changed

+7
-91
lines changed

.github/workflows/changelog-generation.yml

Lines changed: 3 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
uses: anthropics/claude-code-action@beta
6262
with:
6363
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
64+
github_token: ${{ secrets.GITHUB_TOKEN }}
65+
6466
direct_prompt: |
6567
Generate a changelog entry for version ${{ steps.get_version.outputs.VERSION }} of the Cartridge Controller SDK.
6668
@@ -70,7 +72,7 @@ jobs:
7072
7173
Analyze the git commit range: ${{ steps.commit_range.outputs.RANGE }}
7274
73-
Create a changelog entry in this format and save it to a file called new-changelog-entry.md:
75+
Create a changelog entry in this format and update CHANGELOG.md:
7476
7577
## [${{ steps.get_version.outputs.VERSION }}] - $(date +%Y-%m-%d)
7678
@@ -93,62 +95,6 @@ jobs:
9395
9496
allowed_tools: "Read,Write,Bash"
9597

96-
- name: Check if CHANGELOG.md exists
97-
id: check_changelog
98-
run: |
99-
if [ -f "CHANGELOG.md" ]; then
100-
echo "exists=true" >> $GITHUB_OUTPUT
101-
else
102-
echo "exists=false" >> $GITHUB_OUTPUT
103-
fi
104-
105-
- name: Create or update CHANGELOG.md
106-
run: |
107-
if [ "${{ steps.check_changelog.outputs.exists }}" == "true" ]; then
108-
# Insert new entry after the header
109-
if [ -f "new-changelog-entry.md" ]; then
110-
# Create a temporary file
111-
touch temp-changelog.md
112-
113-
# Process the file line by line
114-
header_found=false
115-
first_version_found=false
116-
117-
while IFS= read -r line; do
118-
if [[ "$line" =~ ^#[[:space:]]Changelog ]]; then
119-
# Found the header
120-
echo "$line" >> temp-changelog.md
121-
echo "" >> temp-changelog.md
122-
header_found=true
123-
elif [[ "$header_found" == "true" && "$first_version_found" == "false" && "$line" =~ ^##[[:space:]]\[ ]]; then
124-
# Found the first version entry, insert new content before it
125-
cat new-changelog-entry.md >> temp-changelog.md
126-
echo "" >> temp-changelog.md
127-
echo "$line" >> temp-changelog.md
128-
first_version_found=true
129-
else
130-
# Copy all other lines as-is
131-
echo "$line" >> temp-changelog.md
132-
fi
133-
done < CHANGELOG.md
134-
135-
# If no version entries were found (empty changelog), append the new entry
136-
if [[ "$first_version_found" == "false" && "$header_found" == "true" ]]; then
137-
cat new-changelog-entry.md >> temp-changelog.md
138-
fi
139-
140-
# Replace the original file
141-
mv temp-changelog.md CHANGELOG.md
142-
fi
143-
else
144-
# Create new CHANGELOG.md
145-
echo "# Changelog" > CHANGELOG.md
146-
echo "" >> CHANGELOG.md
147-
if [ -f "new-changelog-entry.md" ]; then
148-
cat new-changelog-entry.md >> CHANGELOG.md
149-
fi
150-
fi
151-
15298
- name: Commit changelog changes
15399
run: |
154100
git config --local user.email "action@github.com"
@@ -160,7 +106,3 @@ jobs:
160106
git commit -m "Generate changelog for v${{ steps.get_version.outputs.VERSION }}"
161107
git push
162108
fi
163-
164-
- name: Clean up temporary files
165-
run: |
166-
rm -f new-changelog-entry.md

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# Changelog
22

3-
## [0.8.0-alpha.0] - 2025-06-24
3+
## [0.8.0] - 2025-06-24
44

55
### ✨ New Features
66
- **Session Management**: Added comprehensive session management functionality enabling secure session handling, registration, and consent flows for improved gaming UX (#1722)
77
- **Controller Interface Simplification**: Streamlined the main Controller interface with improved defaults and better developer experience (#1759)
88

9-
### 🚀 Improvements
9+
### 🚀 Improvements
1010
- **@cartridge/controller**: Refactored WalletConnect implementation in preparation for multiple signers support (#1780)
1111
- **@cartridge/controller**: Improved chain precedence logic to prioritize cartridgeChains over provided chains (#1769)
1212
- **CI/CD**: Enhanced release automation with GitHub releases creation (#1782) and job summaries (#1784)
13-
- **CI/CD**: Added automated changelog generation workflows (#1786)
13+
- **CI/CD**: Added automated changelog generation workflows (#1786) and simplified release workflow (#1789)
1414
- **Development**: Added Claude Code integration and workflow improvements for better collaboration (#1768, #1766)
1515

1616
### 🐛 Bug Fixes
1717
- **@cartridge/profile**: Fixed decimal formatting for credits balance display (#1781)
1818
- **@cartridge/controller**: Fixed Discord integration bug that occurred when no wallet session exists (#1762)
1919
- **Documentation**: Resolved doc-sync injection issues and improved sync reliability (#1764, #1765)
20+
- **CI/CD**: Fixed changelog generation and multi-line output issues in release workflows (#1788)
2021

2122
### ⚠️ Breaking Changes
2223
- **Controller Interface**: The Controller interface has been simplified, which may require updates to existing integrations. Refer to the updated examples for migration guidance (#1759)

new-changelog-entry.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)