Skip to content

Merge pull request #15 from BukeLy/copilot/add-command-list-mechanism #21

Merge pull request #15 from BukeLy/copilot/add-command-list-mechanism

Merge pull request #15 from BukeLy/copilot/add-command-list-mechanism #21

name: Release - Update Changelog
on: []
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
update-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.BEDROCK_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.BEDROCK_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Update Changelog with Claude Code
uses: anthropics/claude-code-action@v1
with:
use_bedrock: "true"
show_full_output: "false"
prompt: |
请更新 CHANGELOG.md 文件以完成版本发布:
1. 当前release版本: ${{ github.event.release.tag_name || github.event.inputs.tag }}
2. 使用 `git tag -l --sort=-version:refname` 获取前一个release标签
3. 使用 `git log [previous-tag]..${{ github.event.release.tag_name || github.event.inputs.tag }} --oneline` 获取此版本的所有提交
4. 根据提交信息总结变更(分类为 Added/Changed/Fixed/Removed)
5. 在 CHANGELOG.md 中:
- 将 [Unreleased] 部分改为 [${{ github.event.release.tag_name || github.event.inputs.tag }}] 日期格式为 YYYY-MM-DD
- 在顶部添加新的 [Unreleased] 部分
- 保持原有的 Markdown 格式
完成后 commit 此更新。
claude_args: |
--allowedTools "Read,Write,Edit,Bash(git:*)"
- name: Push changelog update
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if git diff --quiet CHANGELOG.md; then
echo "No changes to CHANGELOG.md"
else
git push
fi