From 4700e263e31ac23da41fce08a797f594e97e9503 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sun, 4 Oct 2026 20:59:42 +0300 Subject: [PATCH] fix(release): rebuild old tags that predate the bundled Python plugin A dispatched rebuild checks out the tag's commit but runs main's workflow; v2026.40 has no stage-bundled.sh, so the macOS bundle step failed. Skip the plugin with a warning in that case only. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b83a73a9..cbb3d03f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -492,10 +492,16 @@ jobs: cp AppIcon.icns "$APP/Contents/Resources/AppIcon.icns" cp DWG.icns DXF.icns "$APP/Contents/Resources/" # First-party Python scripting plugin. It remains out of process and - # uses the same API/toolchain as this host build. - bash plugins/opencad-python/tools/stage-bundled.sh \ - "$APP/Contents/Resources/plugins/opencad.python" \ - --target aarch64-apple-darwin + # uses the same API/toolchain as this host build. A dispatched + # rebuild of a tag cut before the plugin existed ships without it. + STAGE=plugins/opencad-python/tools/stage-bundled.sh + if [ -f "$STAGE" ] || [ "${{ github.event_name }}" != workflow_dispatch ]; then + bash "$STAGE" \ + "$APP/Contents/Resources/plugins/opencad.python" \ + --target aarch64-apple-darwin + else + echo "::warning::$STAGE missing at this commit; Python plugin not bundled" + fi # QuickLook thumbnail extension. cp -R DWGThumbnail.appex "$APP/Contents/PlugIns/" # Substitute version into Info.plist.