From 92921b22f3e3daabf01931db098c35aa6e166097 Mon Sep 17 00:00:00 2001 From: Simon Clark Date: Sat, 9 May 2026 20:37:29 +0100 Subject: [PATCH 1/3] ci: replace workflows with canonical templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace hardcoded version-check + create-release with the canonical templates from indigo-claude-plugin/docs/plugin-dev/workflows/. - Auto-detects bundle name via find (no "Netro Sprinklers" hardcoding) - Uses softprops/action-gh-release@v2 (was v1, deprecated Node 16) - Uses git rev-parse for tag check (was grep) - Tags now v-prefixed (v2026.5.5), per workspace convention Bumps PluginVersion 2026.5.3 → 2026.5.5 (skipping 5.4 to avoid clash with open PR feat/testingbase-pilot). Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/create-release.yml | 70 +++++++++++++------ .github/workflows/version-check.yml | 39 ++++++++--- .../Contents/Info.plist | 2 +- 3 files changed, 81 insertions(+), 30 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 4ac4ed8..da4ad97 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -2,7 +2,9 @@ name: Create Release on: push: - branches: [main] + branches: + - main + - master jobs: create-release: @@ -10,44 +12,70 @@ jobs: permissions: contents: write steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Determine plugin name + id: get_plugin_name + run: | + PLUGIN_BUNDLE=$(find . -maxdepth 1 -name "*.indigoPlugin" -type d | head -1) + if [ -z "$PLUGIN_BUNDLE" ]; then + echo "Error: No .indigoPlugin directory found in repository root." >&2 + exit 1 + fi + PLUGIN_NAME=$(basename "$PLUGIN_BUNDLE" .indigoPlugin) + echo "plugin_name=$PLUGIN_NAME" >> $GITHUB_OUTPUT + echo "Detected plugin name: $PLUGIN_NAME" + - name: Extract version from Info.plist id: get_version run: | - VERSION=$(grep -A1 'PluginVersion' "Netro Sprinklers.indigoPlugin/Contents/Info.plist" | grep '' | sed 's/.*\(.*\)<\/string>.*/\1/') + PLUGIN_NAME="${{ steps.get_plugin_name.outputs.plugin_name }}" + VERSION=$(grep -A1 'PluginVersion' "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist" | grep '' | sed 's/.*\(.*\)<\/string>.*/\1/') + if [ -z "$VERSION" ]; then + echo "Error: Could not extract PluginVersion from Info.plist." >&2 + exit 1 + fi echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "Found version: $VERSION" + echo "Extracted version: $VERSION" - - name: Check if tag already exists - id: check_tag + - name: Check if release already exists + id: check_release run: | VERSION="${{ steps.get_version.outputs.version }}" - if git tag -l | grep -q "^${VERSION}$"; then + if git rev-parse "v$VERSION" >/dev/null 2>&1; then echo "exists=true" >> $GITHUB_OUTPUT - echo "Tag ${VERSION} already exists, skipping release creation" + echo "Release v$VERSION already exists, skipping." else echo "exists=false" >> $GITHUB_OUTPUT - echo "Tag ${VERSION} does not exist, will create release" + echo "Release v$VERSION does not exist, will create." fi - name: Create plugin bundle zip - if: steps.check_tag.outputs.exists == 'false' + if: steps.check_release.outputs.exists == 'false' run: | - VERSION="${{ steps.get_version.outputs.version }}" - zip -r "Netro Sprinklers.indigoPlugin.zip" "Netro Sprinklers.indigoPlugin" - echo "Created Netro Sprinklers.indigoPlugin.zip" + PLUGIN_NAME="${{ steps.get_plugin_name.outputs.plugin_name }}" + zip -r "${PLUGIN_NAME}.indigoPlugin.zip" "${PLUGIN_NAME}.indigoPlugin" \ + -x "*.pyc" \ + -x "*/__pycache__" \ + -x "*/__pycache__/*" \ + -x "*.sublime-project" \ + -x "*.sublime-workspace" \ + -x "*/.idea" \ + -x "*/.idea/*" \ + -x "*.bbproject" \ + -x "*.bbproject/*" + echo "Created ${PLUGIN_NAME}.indigoPlugin.zip" - - name: Create Release - if: steps.check_tag.outputs.exists == 'false' - uses: softprops/action-gh-release@v1 + - name: Create GitHub Release + if: steps.check_release.outputs.exists == 'false' + uses: softprops/action-gh-release@v2 with: - tag_name: ${{ steps.get_version.outputs.version }} - name: Release ${{ steps.get_version.outputs.version }} + tag_name: v${{ steps.get_version.outputs.version }} + name: Release v${{ steps.get_version.outputs.version }} generate_release_notes: true - files: Netro Sprinklers.indigoPlugin.zip - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + draft: false + prerelease: false + files: ${{ steps.get_plugin_name.outputs.plugin_name }}.indigoPlugin.zip diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index 35e63d0..ebfa43c 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -2,29 +2,52 @@ name: Version Check on: pull_request: - branches: [master, main] + branches: + - main + - master jobs: check-version: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Determine plugin name + id: get_plugin_name + run: | + PLUGIN_BUNDLE=$(find . -maxdepth 1 -name "*.indigoPlugin" -type d | head -1) + if [ -z "$PLUGIN_BUNDLE" ]; then + echo "Error: No .indigoPlugin directory found in repository root." >&2 + exit 1 + fi + PLUGIN_NAME=$(basename "$PLUGIN_BUNDLE" .indigoPlugin) + echo "plugin_name=$PLUGIN_NAME" >> $GITHUB_OUTPUT + echo "Detected plugin name: $PLUGIN_NAME" + - name: Extract version from Info.plist id: get_version run: | - VERSION=$(grep -A1 'PluginVersion' "Netro Sprinklers.indigoPlugin/Contents/Info.plist" | grep '' | sed 's/.*\(.*\)<\/string>.*/\1/') + PLUGIN_NAME="${{ steps.get_plugin_name.outputs.plugin_name }}" + VERSION=$(grep -A1 'PluginVersion' "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist" | grep '' | sed 's/.*\(.*\)<\/string>.*/\1/') + if [ -z "$VERSION" ]; then + echo "Error: Could not extract PluginVersion from Info.plist." >&2 + exit 1 + fi echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "Found version: $VERSION" + echo "Extracted version: $VERSION" - - name: Check if version tag already exists + - name: Check if 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." + if git rev-parse "v$VERSION" >/dev/null 2>&1; then + echo "::error::Version v$VERSION already exists as a git tag. Please update the PluginVersion in Info.plist." + exit 1 + fi + if git rev-parse "$VERSION" >/dev/null 2>&1; then + echo "::error::Version $VERSION already exists as a git tag. Please update the PluginVersion in Info.plist." exit 1 fi - echo "Version ${VERSION} is unique - check passed" + echo "✓ Version $VERSION is new and can be released." diff --git a/Netro Sprinklers.indigoPlugin/Contents/Info.plist b/Netro Sprinklers.indigoPlugin/Contents/Info.plist index 08b52d5..de6c0a8 100644 --- a/Netro Sprinklers.indigoPlugin/Contents/Info.plist +++ b/Netro Sprinklers.indigoPlugin/Contents/Info.plist @@ -3,7 +3,7 @@ PluginVersion - 2026.5.3 + 2026.5.5 ServerApiVersion 3.6 IwsApiVersion From a1b173f878964c2132a0dc5d272cf87e6918c54f Mon Sep 17 00:00:00 2001 From: Simon Clark Date: Sat, 9 May 2026 20:38:51 +0100 Subject: [PATCH 2/3] ci: use -iname for case-insensitive bundle detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match canonical update — bundles like HeatmiserNeo.IndigoPlugin (capital I) need case-insensitive find on Linux runners. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/create-release.yml | 2 +- .github/workflows/version-check.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index da4ad97..7abae12 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -20,7 +20,7 @@ jobs: - name: Determine plugin name id: get_plugin_name run: | - PLUGIN_BUNDLE=$(find . -maxdepth 1 -name "*.indigoPlugin" -type d | head -1) + PLUGIN_BUNDLE=$(find . -maxdepth 1 -iname "*.indigoPlugin" -type d | head -1) if [ -z "$PLUGIN_BUNDLE" ]; then echo "Error: No .indigoPlugin directory found in repository root." >&2 exit 1 diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index ebfa43c..1b0ff42 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -18,7 +18,7 @@ jobs: - name: Determine plugin name id: get_plugin_name run: | - PLUGIN_BUNDLE=$(find . -maxdepth 1 -name "*.indigoPlugin" -type d | head -1) + PLUGIN_BUNDLE=$(find . -maxdepth 1 -iname "*.indigoPlugin" -type d | head -1) if [ -z "$PLUGIN_BUNDLE" ]; then echo "Error: No .indigoPlugin directory found in repository root." >&2 exit 1 From 4ac62ddb1dcd8bca29a7512950585ce3ee129728 Mon Sep 17 00:00:00 2001 From: Simon Clark Date: Sat, 9 May 2026 20:44:00 +0100 Subject: [PATCH 3/3] fix(ci): use bundle name directly, drop case-sensitive suffix-strip Sync to canonical templates' fix: basename suffix-strip was case-sensitive, breaking on bundles with capital-I .IndigoPlugin. Drop the strip entirely; use the bundle name verbatim. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/create-release.yml | 26 +++++++++++++------------- .github/workflows/version-check.yml | 18 +++++++++--------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 7abae12..0633303 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -17,23 +17,23 @@ jobs: with: fetch-depth: 0 - - name: Determine plugin name - id: get_plugin_name + - name: Determine plugin bundle + id: get_plugin run: | - PLUGIN_BUNDLE=$(find . -maxdepth 1 -iname "*.indigoPlugin" -type d | head -1) - if [ -z "$PLUGIN_BUNDLE" ]; then + PLUGIN_BUNDLE_PATH=$(find . -maxdepth 1 -iname "*.indigoPlugin" -type d | head -1) + if [ -z "$PLUGIN_BUNDLE_PATH" ]; then echo "Error: No .indigoPlugin directory found in repository root." >&2 exit 1 fi - PLUGIN_NAME=$(basename "$PLUGIN_BUNDLE" .indigoPlugin) - echo "plugin_name=$PLUGIN_NAME" >> $GITHUB_OUTPUT - echo "Detected plugin name: $PLUGIN_NAME" + PLUGIN_BUNDLE=$(basename "$PLUGIN_BUNDLE_PATH") + echo "plugin_bundle=$PLUGIN_BUNDLE" >> $GITHUB_OUTPUT + echo "Detected plugin bundle: $PLUGIN_BUNDLE" - name: Extract version from Info.plist id: get_version run: | - PLUGIN_NAME="${{ steps.get_plugin_name.outputs.plugin_name }}" - VERSION=$(grep -A1 'PluginVersion' "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist" | grep '' | sed 's/.*\(.*\)<\/string>.*/\1/') + PLUGIN_BUNDLE="${{ steps.get_plugin.outputs.plugin_bundle }}" + VERSION=$(grep -A1 'PluginVersion' "${PLUGIN_BUNDLE}/Contents/Info.plist" | grep '' | sed 's/.*\(.*\)<\/string>.*/\1/') if [ -z "$VERSION" ]; then echo "Error: Could not extract PluginVersion from Info.plist." >&2 exit 1 @@ -56,8 +56,8 @@ jobs: - name: Create plugin bundle zip if: steps.check_release.outputs.exists == 'false' run: | - PLUGIN_NAME="${{ steps.get_plugin_name.outputs.plugin_name }}" - zip -r "${PLUGIN_NAME}.indigoPlugin.zip" "${PLUGIN_NAME}.indigoPlugin" \ + PLUGIN_BUNDLE="${{ steps.get_plugin.outputs.plugin_bundle }}" + zip -r "${PLUGIN_BUNDLE}.zip" "${PLUGIN_BUNDLE}" \ -x "*.pyc" \ -x "*/__pycache__" \ -x "*/__pycache__/*" \ @@ -67,7 +67,7 @@ jobs: -x "*/.idea/*" \ -x "*.bbproject" \ -x "*.bbproject/*" - echo "Created ${PLUGIN_NAME}.indigoPlugin.zip" + echo "Created ${PLUGIN_BUNDLE}.zip" - name: Create GitHub Release if: steps.check_release.outputs.exists == 'false' @@ -78,4 +78,4 @@ jobs: generate_release_notes: true draft: false prerelease: false - files: ${{ steps.get_plugin_name.outputs.plugin_name }}.indigoPlugin.zip + files: ${{ steps.get_plugin.outputs.plugin_bundle }}.zip diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index 1b0ff42..7e8d7cd 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -15,23 +15,23 @@ jobs: with: fetch-depth: 0 - - name: Determine plugin name - id: get_plugin_name + - name: Determine plugin bundle + id: get_plugin run: | - PLUGIN_BUNDLE=$(find . -maxdepth 1 -iname "*.indigoPlugin" -type d | head -1) - if [ -z "$PLUGIN_BUNDLE" ]; then + PLUGIN_BUNDLE_PATH=$(find . -maxdepth 1 -iname "*.indigoPlugin" -type d | head -1) + if [ -z "$PLUGIN_BUNDLE_PATH" ]; then echo "Error: No .indigoPlugin directory found in repository root." >&2 exit 1 fi - PLUGIN_NAME=$(basename "$PLUGIN_BUNDLE" .indigoPlugin) - echo "plugin_name=$PLUGIN_NAME" >> $GITHUB_OUTPUT - echo "Detected plugin name: $PLUGIN_NAME" + PLUGIN_BUNDLE=$(basename "$PLUGIN_BUNDLE_PATH") + echo "plugin_bundle=$PLUGIN_BUNDLE" >> $GITHUB_OUTPUT + echo "Detected plugin bundle: $PLUGIN_BUNDLE" - name: Extract version from Info.plist id: get_version run: | - PLUGIN_NAME="${{ steps.get_plugin_name.outputs.plugin_name }}" - VERSION=$(grep -A1 'PluginVersion' "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist" | grep '' | sed 's/.*\(.*\)<\/string>.*/\1/') + PLUGIN_BUNDLE="${{ steps.get_plugin.outputs.plugin_bundle }}" + VERSION=$(grep -A1 'PluginVersion' "${PLUGIN_BUNDLE}/Contents/Info.plist" | grep '' | sed 's/.*\(.*\)<\/string>.*/\1/') if [ -z "$VERSION" ]; then echo "Error: Could not extract PluginVersion from Info.plist." >&2 exit 1