Merge pull request #47 from initcore0/feat/core-hotkeymonitor #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| # Every merge to main (PR merges land here) builds a DMG and publishes a | |
| # GitHub Release with an auto-incrementing build number. | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: # allow manual runs too | |
| permissions: | |
| contents: write # needed to create releases + push tags | |
| concurrency: | |
| group: release | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout (with whisper.cpp submodule) | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| # The default runner Xcode (15.4 / Swift 5.10) rejects the app's modern | |
| # concurrency; select the newest stable Xcode (Swift 6). | |
| - name: Select Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Show toolchain | |
| run: swift --version | |
| - name: Run unit tests | |
| run: swift test | |
| - name: Compute version | |
| id: version | |
| run: | | |
| BASE=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" OpenWhisp/Info.plist) | |
| TAG="v${BASE}+${GITHUB_RUN_NUMBER}" | |
| echo "base=$BASE" >> "$GITHUB_OUTPUT" | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| echo "Release tag: $TAG (commit ${GITHUB_SHA:0:7})" | |
| - name: Stamp build number into Info.plist | |
| run: | | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${GITHUB_RUN_NUMBER}" OpenWhisp/Info.plist | |
| - name: Build whisper.cpp (submodule) | |
| run: ./scripts/build-whisper.sh | |
| - name: Build app + DMG (release, ad-hoc signed) | |
| run: ./build-dmg.sh release | |
| - name: Verify DMG exists | |
| run: | | |
| test -f dist/OpenWhisp.dmg | |
| ls -lh dist/OpenWhisp.dmg | |
| - name: Publish GitHub Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TAG="${{ steps.version.outputs.tag }}" | |
| NOTES_FILE="$(mktemp)" | |
| cat > "$NOTES_FILE" <<EOF | |
| Automated build from commit ${GITHUB_SHA:0:7} on \`main\`. | |
| **Install:** download \`OpenWhisp.dmg\`, open it, drag **OpenWhisp** to Applications. | |
| > This build is **ad-hoc signed** (no paid Apple Developer ID yet), so macOS | |
| > Gatekeeper blocks it on first launch ("damaged / cannot be opened"). To open: | |
| > • **macOS 15+:** launch once, then **System Settings → Privacy & Security → Open Anyway**. | |
| > • **Any version (Terminal):** \`xattr -dr com.apple.quarantine /Applications/OpenWhisp.app\` | |
| > (Right‑click → Open no longer works for ad-hoc apps on macOS 15+. Building from | |
| > source avoids the warning; a notarized Developer ID build would remove it entirely.) | |
| See the [README](https://github.com/${GITHUB_REPOSITORY}#readme) for setup and permissions. | |
| EOF | |
| gh release create "$TAG" \ | |
| dist/OpenWhisp.dmg \ | |
| --title "OpenWhisp $TAG" \ | |
| --notes-file "$NOTES_FILE" \ | |
| --target "$GITHUB_SHA" |