From 7830e090dfa61541446db8d80f3ae695f9c2662e Mon Sep 17 00:00:00 2001 From: Doan Thieu Date: Thu, 5 Feb 2026 15:45:25 +0700 Subject: [PATCH] Add workflow to build for iOS simulator --- .github/workflows/build_artifact.yml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/build_artifact.yml diff --git a/.github/workflows/build_artifact.yml b/.github/workflows/build_artifact.yml new file mode 100644 index 0000000..eeb8556 --- /dev/null +++ b/.github/workflows/build_artifact.yml @@ -0,0 +1,45 @@ +name: Build iOS artifact for the Simulator + +on: + workflow_dispatch: + inputs: + branch: + description: Branch or ref to build + required: true + default: main + +jobs: + build_simulator_artifact: + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + ref: ${{ inputs.branch }} + + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode.app + + - name: Build for iOS Simulator + run: | + xcodebuild \ + -project App/Landmarks.xcodeproj \ + -scheme Landmarks \ + -sdk iphonesimulator \ + -configuration Debug \ + -destination 'platform=iOS Simulator,name=iPhone 17' \ + -derivedDataPath build \ + clean build + + - name: Zip .app + run: | + cd build/Build/Products/Debug-iphonesimulator + zip -r Landmarks.app.zip Landmarks.app + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: Landmarks-iOS + path: build/Build/Products/Debug-iphonesimulator/Landmarks.app.zip + retention-days: 5