Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 3 additions & 61 deletions .github/workflows/changelog-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good addition: Adding the github_token parameter is important for the action to have proper permissions to update the repository. This was likely missing from the original implementation.


direct_prompt: |
Generate a changelog entry for version ${{ steps.get_version.outputs.VERSION }} of the Cartridge Controller SDK.

Expand All @@ -70,7 +72,7 @@ jobs:

Analyze the git commit range: ${{ steps.commit_range.outputs.RANGE }}

Create a changelog entry in this format and save it to a file called new-changelog-entry.md:
Create a changelog entry in this format and update CHANGELOG.md:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent simplification: Changing from creating a separate file to directly updating CHANGELOG.md eliminates the need for complex bash scripting and reduces the chance of formatting errors. This is much more maintainable.


## [${{ steps.get_version.outputs.VERSION }}] - $(date +%Y-%m-%d)

Expand All @@ -93,62 +95,6 @@ jobs:

allowed_tools: "Read,Write,Bash"

- name: Check if CHANGELOG.md exists
id: check_changelog
run: |
if [ -f "CHANGELOG.md" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi

- name: Create or update CHANGELOG.md
run: |
if [ "${{ steps.check_changelog.outputs.exists }}" == "true" ]; then
# Insert new entry after the header
if [ -f "new-changelog-entry.md" ]; then
# Create a temporary file
touch temp-changelog.md

# Process the file line by line
header_found=false
first_version_found=false

while IFS= read -r line; do
if [[ "$line" =~ ^#[[:space:]]Changelog ]]; then
# Found the header
echo "$line" >> temp-changelog.md
echo "" >> temp-changelog.md
header_found=true
elif [[ "$header_found" == "true" && "$first_version_found" == "false" && "$line" =~ ^##[[:space:]]\[ ]]; then
# Found the first version entry, insert new content before it
cat new-changelog-entry.md >> temp-changelog.md
echo "" >> temp-changelog.md
echo "$line" >> temp-changelog.md
first_version_found=true
else
# Copy all other lines as-is
echo "$line" >> temp-changelog.md
fi
done < CHANGELOG.md

# If no version entries were found (empty changelog), append the new entry
if [[ "$first_version_found" == "false" && "$header_found" == "true" ]]; then
cat new-changelog-entry.md >> temp-changelog.md
fi

# Replace the original file
mv temp-changelog.md CHANGELOG.md
fi
else
# Create new CHANGELOG.md
echo "# Changelog" > CHANGELOG.md
echo "" >> CHANGELOG.md
if [ -f "new-changelog-entry.md" ]; then
cat new-changelog-entry.md >> CHANGELOG.md
fi
fi

- name: Commit changelog changes
run: |
git config --local user.email "action@github.com"
Expand All @@ -160,7 +106,3 @@ jobs:
git commit -m "Generate changelog for v${{ steps.get_version.outputs.VERSION }}"
git push
fi

- name: Clean up temporary files
run: |
rm -f new-changelog-entry.md
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# Changelog

## [0.8.0-alpha.0] - 2025-06-24
## [0.8.0] - 2025-06-24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version update: Changed from 0.8.0-alpha.0 to 0.8.0 indicates this is moving from alpha to stable release. The addition of the changelog generation fix (#1788) is also appropriately documented.


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

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

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

### ⚠️ Breaking Changes
- **Controller Interface**: The Controller interface has been simplified, which may require updates to existing integrations. Refer to the updated examples for migration guidance (#1759)
Expand Down
27 changes: 0 additions & 27 deletions new-changelog-entry.md

This file was deleted.

Loading