Skip to content

fix: attach only to the vphone display window, dismiss with it #31

fix: attach only to the vphone display window, dismiss with it

fix: attach only to the vphone display window, dismiss with it #31

Workflow file for this run

name: Check Version Bump
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: macos-26
timeout-minutes: 20
concurrency:
group: ci-build-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
actions: write
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Xcode Select Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Resolve project info
id: project
run: |
XCODEPROJ=$(find . -maxdepth 1 -name "*.xcodeproj" -type d | head -1)
XCODEPROJ="${XCODEPROJ#./}"
SCHEME=$(basename "$(find "$XCODEPROJ/xcshareddata/xcschemes" -name "*.xcscheme" | head -1)" .xcscheme)
echo "project=$XCODEPROJ" >> "$GITHUB_OUTPUT"
echo "scheme=$SCHEME" >> "$GITHUB_OUTPUT"
- name: Cache Xcode build (DerivedData + SourcePackages)
uses: irgaly/xcode-cache@v1
with:
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }}
restore-keys: |
xcode-cache-deriveddata-${{ github.workflow }}-
sourcepackages-directory: SourcePackages
delete-used-deriveddata-cache: true
- name: Build (Debug, unsigned)
run: |
xcodebuild build \
-project "${{ steps.project.outputs.project }}" \
-scheme "${{ steps.project.outputs.scheme }}" \
-configuration Debug \
-destination "platform=macOS" \
-clonedSourcePackagesDirPath SourcePackages \
CODE_SIGNING_ALLOWED=NO \
| xcbeautify
check:
if: github.event_name == 'push'
runs-on: ubuntu-latest
concurrency:
group: ci-check-${{ github.ref }}
cancel-in-progress: true
outputs:
bumped: ${{ steps.check.outputs.bumped }}
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Check version bump
id: check
run: |
XCODEPROJ=$(find . -maxdepth 1 -name "*.xcodeproj" -type d | head -1)
XCODEPROJ="${XCODEPROJ#./}"
PBXPROJ="$XCODEPROJ/project.pbxproj"
CURRENT=$(grep -m1 'MARKETING_VERSION' "$PBXPROJ" | tr -d ' ;' | cut -d= -f2)
# --match restricts this to semver-shaped tags — an unrelated tag (a
# milestone marker, a backup point, anything not X.Y.Z) would otherwise
# get picked up by plain `--tags --abbrev=0` and compared against
# MARKETING_VERSION with unpredictable sort -V results.
LATEST_TAG=$(git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*' 2>/dev/null || echo "0.0.0")
echo "Current: $CURRENT, Latest tag: $LATEST_TAG"
if [ "$CURRENT" != "$LATEST_TAG" ] && [ "$(printf '%s\n' "$LATEST_TAG" "$CURRENT" | sort -V | tail -n1)" = "$CURRENT" ]; then
echo "bumped=true" >> "$GITHUB_OUTPUT"
else
echo "bumped=false" >> "$GITHUB_OUTPUT"
fi
release:
needs: [check, build]
if: github.event_name == 'push' && needs.check.outputs.bumped == 'true'
uses: ./.github/workflows/release.yml
secrets: inherit
permissions:
contents: write