Skip to content

Commit 6e9acd9

Browse files
authored
ci: restore GitHub releases on version bump (#1599)
The "Create GitHub Releases" step was accidentally removed in 0636c3e when the OpenClaw plugin packages were deleted. That commit stripped all plugin-related CI steps, but the release creation step was useful beyond plugins — it gave visibility into what version was deployed. Add a `github-release` job that runs in parallel with `publish-docker` when a version bump is detected. It extracts the changelog section from packages/manifest/CHANGELOG.md, creates a git tag, and publishes a GitHub release via `gh release create`. No releases were created for versions 5.46.0 through 5.46.7.
1 parent 2493d97 commit 6e9acd9

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,40 @@ jobs:
6363
echo "No version change (PREV=${PREV:-<none>} CURR=${CURR:-<none>})"
6464
fi
6565
66+
github-release:
67+
needs: release
68+
if: needs.release.outputs.should_publish == 'true'
69+
runs-on: ubuntu-latest
70+
permissions:
71+
contents: write
72+
steps:
73+
- uses: actions/checkout@v4
74+
- name: Create GitHub Release
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
run: |
78+
VERSION=$(jq -r .version packages/manifest/package.json)
79+
TAG="manifest@${VERSION}"
80+
81+
# Extract changelog section for this version
82+
BODY=$(awk -v ver="## ${VERSION}" \
83+
'$0 == ver { found=1; next } found && /^## / { exit } found { print }' \
84+
packages/manifest/CHANGELOG.md)
85+
86+
# Add emoji headers
87+
BODY=$(echo "$BODY" | sed \
88+
-e 's/^### Major Changes$/### 💥 Major Changes/' \
89+
-e 's/^### Minor Changes$/### ✨ Minor Changes/' \
90+
-e 's/^### Patch Changes$/### 🐛 Patch Changes/')
91+
92+
git tag "$TAG" 2>/dev/null || true
93+
git push origin "$TAG" 2>/dev/null || true
94+
95+
gh release create "$TAG" \
96+
--title "manifest v${VERSION}" \
97+
--notes "${BODY:-No changelog}" \
98+
--verify-tag
99+
66100
publish-docker:
67101
needs: release
68102
if: needs.release.outputs.should_publish == 'true'

0 commit comments

Comments
 (0)