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
108 changes: 0 additions & 108 deletions .github/workflows/changelog-generation.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/release-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Set up Node.js
Expand All @@ -38,6 +40,55 @@
run: |
VERSION=${{ github.event.inputs.version }}
pnpm -r exec -- bash -c "npm version $VERSION --no-git-tag-version"

- name: Get commit range for changelog
id: commit_range
run: |
LATEST_TAG=$(gh release list --limit 1 --exclude-pre-releases --exclude-drafts --json tagName --jq '.[0].tagName' || echo "")
if [ -z "$LATEST_TAG" ]; then
LATEST_TAG=$(git log --oneline -n 50 | tail -1 | cut -d' ' -f1)
fi
echo "RANGE=${LATEST_TAG}..HEAD" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Generate Changelog with Claude
id: changelog
uses: anthropics/claude-code-action@beta

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'release-dispatch' step
Uses Step: changelog
uses 'anthropics/claude-code-action' with ref 'beta', not a pinned commit hash
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
direct_prompt: |
Generate a changelog entry for version ${{ github.event.inputs.version }} of the Cartridge Controller SDK.

This is a monorepo containing:
- @cartridge/controller - Main SDK implementing Starknet account interfaces
- @cartridge/connector - Lightweight connector interface for Starknet React applications

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

Create a changelog entry in this format and update CHANGELOG.md:

## [${{ github.event.inputs.version }}] - $(date +%Y-%m-%d)

### ✨ New Features
- [List new features with brief descriptions]

### 🚀 Improvements
- [List improvements and enhancements]

### 🐛 Bug Fixes
- [List bug fixes]

### ⚠️ Breaking Changes
- [List any breaking changes with migration guidance]

### 📦 Dependencies
- [List significant dependency updates]

Focus on user-facing changes and be professional. Group changes by package (@cartridge/controller vs @cartridge/connector) when relevant.
allowed_tools: "Read,Write,Bash"

- name: Create Release Pull Request
if: ${{ github.event.inputs.tag == 'latest' }}
id: cpr
Expand Down
Loading