Skip to content

Commit 5236fa0

Browse files
xiangzhang-ywclaude
andcommitted
ci: auto-release zip on tag push
Builds edgespark-codex-plugins.zip from plugins/edgespark/ and creates a GitHub release whenever a semver tag is pushed. Verifies the tag matches the version in plugin.json before publishing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 18acf96 commit 5236fa0

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Read version from plugin.json
18+
id: version
19+
run: |
20+
VERSION=$(jq -r '.version' plugins/edgespark/.codex-plugin/plugin.json)
21+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
22+
23+
- name: Verify tag matches plugin.json version
24+
run: |
25+
TAG="${GITHUB_REF_NAME}"
26+
VERSION="${{ steps.version.outputs.version }}"
27+
if [ "$TAG" != "$VERSION" ]; then
28+
echo "::error::Tag ($TAG) does not match plugin.json version ($VERSION)"
29+
exit 1
30+
fi
31+
32+
- name: Build release zip
33+
run: |
34+
cd plugins
35+
zip -r "$GITHUB_WORKSPACE/edgespark-codex-plugins.zip" edgespark/ -x "*.git*"
36+
37+
- name: Create GitHub release
38+
env:
39+
GH_TOKEN: ${{ github.token }}
40+
run: |
41+
gh release create "$GITHUB_REF_NAME" \
42+
edgespark-codex-plugins.zip \
43+
--title "$GITHUB_REF_NAME" \
44+
--generate-notes

0 commit comments

Comments
 (0)