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 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-05 15:54:32 +03:00
1 parent de6e27304d
commit 47eef134cb
1 file changed
+10 -20
+10 -20
View File
@@ -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<hash>`.
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<hash>`.
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<hash>`.
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<hash>`.
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 }}