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 }}