Skip to content

Release 1.0.3

Release 1.0.3 #4

Workflow file for this run

# Simple release: validate version and attach plugin zip to GitHub Release.
# Trigger: create a release (tag e.g. v1.0.0) and publish it.
name: Release
on:
release:
types: [published]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Validate version
run: |
TAG="${{ github.event.release.tag_name }}"
# Allow v1.0.0 or 1.0.0
VERSION="${TAG#v}"
PLUGIN_VERSION=$(jq -r '.version' .cursor-plugin/plugin.json)
if [ "$PLUGIN_VERSION" != "$VERSION" ]; then
echo "::error::plugin.json version ($PLUGIN_VERSION) does not match release tag ($TAG). Update .cursor-plugin/plugin.json to $VERSION before releasing."
exit 1
fi
echo "Version OK: $PLUGIN_VERSION"
- name: Create plugin bundle (skills inlined via --dereference)
run: |
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
BUNDLE_NAME="clickhouse-cursor-plugin-${VERSION}"
BUNDLE_TAR="/tmp/${BUNDLE_NAME}.tar.gz"
tar -czvf "$BUNDLE_TAR" \
--dereference \
--exclude='.git' \
--exclude='submodules' \
.
echo "BUNDLE_TAR=$BUNDLE_TAR" >> "$GITHUB_ENV"
- name: Upload release asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.event.release.tag_name }}" "${{ env.BUNDLE_TAR }}" --clobber