diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 1374b5d..6f822cf 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -3,8 +3,8 @@ name: Deploy to GitHub Pages on: workflow_run: workflows: ["CI", "Skill Release"] - branches: [main] types: [completed] + # Note: No branch restriction - must trigger on both main branch CI runs AND tag-based Skill Releases workflow_dispatch: permissions: diff --git a/.github/workflows/skill-release.yml b/.github/workflows/skill-release.yml index c28ac05..712dac8 100644 --- a/.github/workflows/skill-release.yml +++ b/.github/workflows/skill-release.yml @@ -787,6 +787,41 @@ jobs: echo "Signed and verified release-assets/checksums.json" ls -la release-assets/ + - name: Extract changelog entry + id: changelog + run: | + set -euo pipefail + SKILL_PATH="${{ steps.parse.outputs.skill_path }}" + VERSION="${{ steps.parse.outputs.version }}" + + if [ ! -f "$SKILL_PATH/CHANGELOG.md" ]; then + echo "No CHANGELOG.md found" + echo "changelog=" >> $GITHUB_OUTPUT + exit 0 + fi + + # Extract the changelog section for this version + # Pattern: ## [VERSION] - DATE ... until next ## [ or end of file + CHANGELOG_ENTRY=$(awk -v version="$VERSION" ' + BEGIN { in_section = 0; found = 0 } + $0 ~ ("^## \\[" version "\\]") { in_section = 1; found = 1; next } + in_section && /^## \[/ && found { exit } + in_section { print } + ' "$SKILL_PATH/CHANGELOG.md") + + if [ -z "$CHANGELOG_ENTRY" ]; then + echo "No changelog entry found for version $VERSION" + echo "changelog=" >> $GITHUB_OUTPUT + else + echo "Found changelog entry for version $VERSION" + # Use multiline output format for GitHub Actions + { + echo "changelog<> $GITHUB_OUTPUT + fi + - name: Create GitHub Release uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 with: @@ -796,6 +831,8 @@ jobs: body: | ## ${{ steps.parse.outputs.skill_name }} ${{ steps.parse.outputs.version }} + ${{ steps.changelog.outputs.changelog }} + ### Quick Install **Via clawhub (recommended):**