From 47eef134cb0a8d4e9fb39de984ee0e94521aea38 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Mon, 5 Oct 2026 15:54:32 +0300 Subject: [PATCH] fix(release): rebuild a tag from the commit the tag points at The v2026.40 rebuild was dispatched with a separate `commit` input copied from a stale local tag, so Windows/macOS assets were built from 20803948 instead of 8e122a4e. Dispatch now takes only `tag` and checks the tag out. Reverts 4700e263: the skipped Python plugin was a symptom of that commit. Fixes #1612 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cbb3d03f0..79e07fb89 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,15 +24,11 @@ on: options: - all - snap - # Rebuild an already-published release: tag plus the commit it points at. + # Rebuild an already-published release from the commit its tag points at. tag: description: Existing release tag to rebuild (optional) default: '' type: string - commit: - description: Commit the tag points at (required with tag) - default: '' - type: string env: RELEASE_TAG: ${{ inputs.tag || github.event.release.tag_name }} @@ -50,7 +46,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: ${{ inputs.commit || github.sha }} + ref: ${{ inputs.commit || inputs.tag || github.sha }} # Full history so build.rs can measure the distance from the # release tag; a shallow clone would label the build `+g`. fetch-depth: 0 @@ -141,7 +137,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: ${{ inputs.commit || github.sha }} + ref: ${{ inputs.commit || inputs.tag || github.sha }} # Full history so build.rs can measure the distance from the # release tag; a shallow clone would label the build `+g`. fetch-depth: 0 @@ -216,7 +212,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: ${{ inputs.commit || github.sha }} + ref: ${{ inputs.commit || inputs.tag || github.sha }} # Full history so build.rs can measure the distance from the # release tag; a shallow clone would label the build `+g`. fetch-depth: 0 @@ -398,7 +394,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: ${{ inputs.commit || github.sha }} + ref: ${{ inputs.commit || inputs.tag || github.sha }} # Full history so build.rs can measure the distance from the # release tag; a shallow clone would label the build `+g`. fetch-depth: 0 @@ -492,16 +488,10 @@ 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. 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 + # 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 # QuickLook thumbnail extension. cp -R DWGThumbnail.appex "$APP/Contents/PlugIns/" # Substitute version into Info.plist. @@ -571,7 +561,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ inputs.commit || github.sha }} + ref: ${{ inputs.commit || inputs.tag || github.sha }} - name: Verify native release assets and notes env: GH_TOKEN: ${{ github.token }}