From 244b15d61a002eca8cc7f6d142dcab7fd4ec29bf Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Jul 2026 19:56:35 +0000 Subject: [PATCH] Add workflow to attach a built macOS app bundle to GitHub releases Releases currently only offer GitHub's auto-generated source archive. Build wInstaller.app via Scripts/build-app.sh on a macOS runner and upload it as a zipped release asset whenever a release is published, or on demand via workflow_dispatch for existing releases. --- .github/workflows/release-macos.yml | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/release-macos.yml diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml new file mode 100644 index 0000000..8873687 --- /dev/null +++ b/.github/workflows/release-macos.yml @@ -0,0 +1,50 @@ +name: Release macOS app + +on: + release: + types: [published] + workflow_dispatch: + inputs: + tag: + description: "Existing release tag to attach the built app to" + required: true + +permissions: + contents: write + +jobs: + build-and-upload: + # See ci-macos.yml for why we select the newest available Xcode rather + # than pinning a version. + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name || inputs.tag }} + + - name: Select newest available Xcode + run: | + latest=$(ls -d /Applications/Xcode_*.app 2>/dev/null | sort -V | tail -n1) + if [ -z "$latest" ]; then + echo "::error::No /Applications/Xcode_*.app found on this runner." + exit 1 + fi + echo "Selecting $latest" + sudo xcode-select -s "$latest" + xcodebuild -version + + - name: Build wInstaller.app + run: Scripts/build-app.sh "$RUNNER_TEMP/build" + + - name: Zip app bundle + run: | + cd "$RUNNER_TEMP/build" + ditto -c -k --sequesterRsrc --keepParent wInstaller.app wInstaller-macOS.zip + + - name: Upload asset to release + env: + GH_TOKEN: ${{ github.token }} + run: | + tag="${{ github.event.release.tag_name || inputs.tag }}" + gh release upload "$tag" "$RUNNER_TEMP/build/wInstaller-macOS.zip" \ + --clobber -R "${{ github.repository }}"