Skip to content

Release 1.0.5

Release 1.0.5 #6

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: Set tag from ref
if: github.event_name == 'release'
run: |
echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV"
- name: Validate version
run: |
# Allow v1.0.0 or 1.0.0 (GITHUB_TAG set from ref in previous step)
VERSION="${GITHUB_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 ($GITHUB_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: |
VERSION="${GITHUB_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_TAG" "$BUNDLE_TAR" --clobber