From 3ba8618a7eb8bcedc1d7d9f9a7afb4b271b25c62 Mon Sep 17 00:00:00 2001 From: Simon Clark Date: Mon, 23 Feb 2026 21:38:16 +0000 Subject: [PATCH] Add GitHub release workflows and bump version to 2026.0.2 - Add create-release workflow: auto-creates GitHub releases with plugin zip on push to main when version tag is new - Add version-check workflow: fails PRs if version already tagged - Bump PluginVersion and CFBundleVersion to 2026.0.2 Co-Authored-By: Claude Opus 4.6 --- .github/workflows/create-release.yml | 53 +++++++++++++++++++ .github/workflows/version-check.yml | 30 +++++++++++ .../Contents/Info.plist | 4 +- 3 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/create-release.yml create mode 100644 .github/workflows/version-check.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..7fc5658 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,53 @@ +name: Create Release + +on: + push: + branches: [main] + +jobs: + create-release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Extract version from Info.plist + id: get_version + run: | + VERSION=$(grep -A1 'PluginVersion' "LogsOverReflector.indigoPlugin/Contents/Info.plist" | grep '' | sed 's/.*\(.*\)<\/string>.*/\1/') + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Found version: $VERSION" + + - name: Check if tag already exists + id: check_tag + run: | + VERSION="${{ steps.get_version.outputs.version }}" + if git tag -l | grep -q "^${VERSION}$"; then + echo "exists=true" >> $GITHUB_OUTPUT + echo "Tag ${VERSION} already exists, skipping release creation" + else + echo "exists=false" >> $GITHUB_OUTPUT + echo "Tag ${VERSION} does not exist, will create release" + fi + + - name: Create plugin bundle zip + if: steps.check_tag.outputs.exists == 'false' + run: | + VERSION="${{ steps.get_version.outputs.version }}" + zip -r "LogsOverReflector.indigoPlugin.zip" "LogsOverReflector.indigoPlugin" + echo "Created LogsOverReflector.indigoPlugin.zip" + + - name: Create Release + if: steps.check_tag.outputs.exists == 'false' + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ steps.get_version.outputs.version }} + name: Release ${{ steps.get_version.outputs.version }} + generate_release_notes: true + files: LogsOverReflector.indigoPlugin.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml new file mode 100644 index 0000000..2b9e75f --- /dev/null +++ b/.github/workflows/version-check.yml @@ -0,0 +1,30 @@ +name: Version Check + +on: + pull_request: + branches: [master, main] + +jobs: + check-version: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Extract version from Info.plist + id: get_version + run: | + VERSION=$(grep -A1 'PluginVersion' "LogsOverReflector.indigoPlugin/Contents/Info.plist" | grep '' | sed 's/.*\(.*\)<\/string>.*/\1/') + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Found version: $VERSION" + + - name: Check if version tag already exists + run: | + VERSION="${{ steps.get_version.outputs.version }}" + if git tag -l | grep -q "^${VERSION}$"; then + echo "::error::Version ${VERSION} already exists as a tag. Please update the version in Info.plist." + exit 1 + fi + echo "Version ${VERSION} is unique - check passed" diff --git a/LogsOverReflector.indigoPlugin/Contents/Info.plist b/LogsOverReflector.indigoPlugin/Contents/Info.plist index 38f429a..00998fe 100644 --- a/LogsOverReflector.indigoPlugin/Contents/Info.plist +++ b/LogsOverReflector.indigoPlugin/Contents/Info.plist @@ -3,7 +3,7 @@ PluginVersion - 2026.0.1 + 2026.0.2 ServerApiVersion 3.6 CFBundleDisplayName @@ -11,7 +11,7 @@ CFBundleIdentifier com.simons-plugins.logs-over-reflector CFBundleVersion - 2026.0.1 + 2026.0.2 CFBundleURLTypes