Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/release-macos.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
Loading