Skip to content

fix: address cd.yml workflow issues #11

fix: address cd.yml workflow issues

fix: address cd.yml workflow issues #11

Workflow file for this run

name: Continuous Deployment

Check failure on line 1 in .github/workflows/cd.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cd.yml

Invalid workflow file

(Line: 44, Col: 9): Unexpected value 'uses', (Line: 45, Col: 9): Unexpected value 'with', (Line: 42, Col: 9): Required property is missing: run
on:
workflow_dispatch:
push:
tags:
- 'v*'
release:
types: [published]
jobs:
generate-changelog:
name: Generate changelog
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
outputs:
release_body: ${{ steps.git-cliff-latest.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate latest changelog for release
uses: orhun/git-cliff-action@v4
id: git-cliff-latest
with:
config: pyproject.toml
args: -vv --latest --strip header
env:
GITHUB_REPO: ${{ github.repository }}
- name: Fetch latest main
run: git fetch origin main
- name: Create worktree for changelog
run: git worktree add worktree-changelog origin/main
- name: Generate full changelog in worktree
working-directory: worktree-changelog
uses: orhun/git-cliff-action@v4
with:
config: pyproject.toml
args: -vv
env:
OUTPUT: docs/changelog.rst
GITHUB_REPO: ${{ github.repository }}
- name: Create PR with changelog updates
working-directory: worktree-changelog
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add docs/changelog.rst
if git diff --staged --quiet; then
echo "No changes to commit"
else
# Create unique branch name
BRANCH_NAME="changelog/update-$(git rev-parse --short HEAD)"
git checkout -b "$BRANCH_NAME"
# Commit with Claude Code signature
git commit -m "docs: update changelog" \
-m "🤖 Generated with [Claude Code](https://claude.com/claude-code)" \
-m "Co-Authored-By: Claude <noreply@anthropic.com>"
# Push and create PR
git push origin "$BRANCH_NAME"
gh pr create \
--base main \
--head "$BRANCH_NAME" \
--title "docs: update changelog" \
--body "Automated changelog update generated by git-cliff.
This PR updates the changelog with the latest commits.
🤖 Generated with [Claude Code](https://claude.com/claude-code)" \
--label "documentation" \
--label "automated"
fi
env:
GH_TOKEN: ${{ github.token }}
- name: Update GitHub release body
if: github.event_name == 'release'
run: |
# Update release body with latest changelog
gh release edit "${{ github.event.release.tag_name }}" \
--notes "${{ steps.git-cliff-latest.outputs.content }}" \
--repo ${{ github.repository }}
env:
GH_TOKEN: ${{ github.token }}
- name: Cleanup worktree
if: always()
run: git worktree remove worktree-changelog || true