eleven / messenger Public

workflow: trigger on all branches for testing

James Adam f981dbe7ee25fafe6b48385b285df39d66075667 parent 5a2aa71
1 file changed, +70 −0
  • .github/workflows/build-apps.yml +70 −0
diff --git a/.github/workflows/build-apps.yml b/.github/workflows/build-apps.yml
new file mode 100644
index 0000000..7be20d7
--- /dev/null
+++ b/.github/workflows/build-apps.yml
@@ -0,0 +1,70 @@
+name: Build Mac & iOS Apps
+
+on:
+ push:
+ paths:
+ - 'ios/**'
+ - '.github/workflows/build-apps.yml'
+ pull_request:
+ paths:
+ - 'ios/**'
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: macos-latest
+ permissions:
+ contents: write
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Install xcodegen
+ run: brew install xcodegen
+
+ - name: Generate Xcode project
+ working-directory: ios
+ run: xcodegen generate
+
+ - name: Build macOS (Mac Catalyst)
+ working-directory: ios
+ run: |
+ xcodebuild -project LChat.xcodeproj -scheme LChat \
+ -destination 'platform=macOS,variant=Mac Catalyst' \
+ -derivedDataPath build CODE_SIGNING_ALLOWED=NO build
+
+ - name: Build iOS (Simulator)
+ working-directory: ios
+ run: |
+ xcodebuild -project LChat.xcodeproj -scheme LChat \
+ -sdk iphonesimulator \
+ -derivedDataPath build CODE_SIGNING_ALLOWED=NO build
+
+ - name: Prepare artifacts
+ run: |
+ mkdir -p artifacts
+ # Mac Catalyst build
+ ditto ios/build/Build/Products/Debug-maccatalyst/LChat.app artifacts/LChat-mac.app
+ # iOS Simulator build
+ ditto ios/build/Build/Products/Debug-iphonesimulator/LChat.app artifacts/LChat-ios.app
+
+ - name: Create release
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+ uses: softprops/action-gh-release@v1
+ with:
+ files: artifacts/**
+ tag_name: app-build-${{ github.run_number }}
+ name: App Build ${{ github.run_number }}
+ body: |
+ Built from commit ${{ github.sha }}
+ - **LChat-mac.app** — macOS (Mac Catalyst)
+ - **LChat-ios.app** — iOS Simulator build
+
+ - name: Upload artifacts for PR
+ if: github.event_name == 'pull_request'
+ uses: actions/upload-artifact@v4
+ with:
+ name: lchat-apps-${{ github.run_number }}
+ path: artifacts/
+ retention-days: 7