|
49 | 49 | skip-version-file: 'false' |
50 | 50 | skip-commit: 'false' |
51 | 51 |
|
52 | | - # 3. Update SKILL.md version history (custom format) |
53 | | - # Only run if a new version was created |
54 | | - - name: Update SKILL.md Version History |
55 | | - if: steps.changelog.outputs.skipped == 'false' |
56 | | - env: |
57 | | - VERSION: ${{ steps.changelog.outputs.version }} |
58 | | - run: | |
59 | | - set -e |
60 | | - set -o pipefail |
61 | | -
|
62 | | - DATE=$(date +%Y-%m-%d) |
63 | | - VERSION_LINE="- $VERSION ($DATE): " |
64 | | -
|
65 | | - if grep -q "^**Version History:**" SKILL.md; then |
66 | | - # Escape special characters for sed |
67 | | - ESCAPED_LINE=$(printf '%s\n' "$VERSION_LINE" | sed -e 's/[\/&]/\\&/g') |
68 | | - sed -i "/^\*\*Version History:\*\*$/a $ESCAPED_LINE" SKILL.md |
69 | | - echo "✓ Added version $VERSION to SKILL.md history" |
70 | | - fi |
71 | | -
|
72 | | - # 4. Commit SKILL.md update (if changed) |
73 | | - - name: Commit SKILL.md Update |
74 | | - if: steps.changelog.outputs.skipped == 'false' |
75 | | - env: |
76 | | - VERSION: ${{ steps.changelog.outputs.version }} |
77 | | - run: | |
78 | | - set -e |
79 | | - set -o pipefail |
80 | | -
|
81 | | - git config user.name "github-actions[bot]" |
82 | | - git config user.email "github-actions[bot]@users.noreply.github.com" |
83 | | -
|
84 | | - git add SKILL.md |
85 | | -
|
86 | | - if git diff --staged --quiet; then |
87 | | - echo "No SKILL.md changes to commit" |
88 | | - else |
89 | | - git commit -m "chore(release): update SKILL.md version history for $VERSION" |
90 | | - git push origin HEAD:master |
91 | | - echo "✓ Committed SKILL.md update" |
92 | | - fi |
93 | | -
|
94 | | - # 5. Create GitHub Release |
| 52 | + # 3. Create GitHub Release |
95 | 53 | # Only run if a new version was created |
96 | 54 | - name: Create GitHub Release |
97 | 55 | if: steps.changelog.outputs.skipped == 'false' |
|
105 | 63 | env: |
106 | 64 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
107 | 65 |
|
108 | | - # 6. Summary |
| 66 | + # 4. Summary |
109 | 67 | - name: Release Summary |
110 | 68 | if: steps.changelog.outputs.skipped == 'false' |
111 | 69 | env: |
|
0 commit comments