From 03ed531531fa13e5537404d260d41c2b4b290fe8 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Sat, 6 May 2023 16:37:07 +1000 Subject: [PATCH 1/7] Create capacitor.yaml --- .github/workflows/capacitor.yaml | 84 ++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 .github/workflows/capacitor.yaml diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml new file mode 100644 index 00000000..2d13bcba --- /dev/null +++ b/.github/workflows/capacitor.yaml @@ -0,0 +1,84 @@ +name: Capacitor + +on: + workflow_dispatch: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + capacitor-android: + name: @capacitor/android@${{ matrix.capacitor }} + + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - jdk: 16 + capacitor: latest + node: 18.x + - jdk: 11 + capacitor: 4 + node: 14.x + + steps: + - uses: actions/checkout@v3 + - name: set up JDK ${{ matrix.jdk }} + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.jdk }} + distribution: 'temurin' + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + - name: Build test app + run: | + mkdir temp + cd temp + mkdir www + touch www/index.html + npm init -y + npm install .. + npm install @capacitor/cli@${{ matrix.capacitor }} @capacitor/core@${{ matrix.capacitor }} @capacitor/android@${{ matrix.capacitor }} + npx cap init test io.test.app + npx cap add android + npx cap sync android + cd android + chmod +x gradlew + ./gradlew build + + + capacitor-ios: + name: @capacitor/ios@${{ matrix.capacitor }} + if: ${{ false }} + runs-on: macos-latest + + strategy: + matrix: + include: + - capacitor: latest + node: 18.x + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + - name: Build test app + run: | + mkdir temp + cd temp + mkdir www + touch www/index.html + npm init -y + npm install .. + npm install @capacitor/cli@${{ matrix.capacitor }} @capacitor/core@${{ matrix.capacitor }} @capacitor/ios@${{ matrix.capacitor }} + npx cap init test io.test.app + npx cap add ios + npx cap sync ios + cd ios + # xcodebuild -workspace App/App.xcworkspace -scheme App -configuration Debug -sdk iphonesimulator -destination platform="iOS Simulator" From b0bdc32e8a8e52d1f3135d44737a6e477f853bc7 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Sat, 6 May 2023 16:40:37 +1000 Subject: [PATCH 2/7] Update capacitor.yaml --- .github/workflows/capacitor.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml index 2d13bcba..88d95547 100644 --- a/.github/workflows/capacitor.yaml +++ b/.github/workflows/capacitor.yaml @@ -9,7 +9,7 @@ on: jobs: capacitor-android: - name: @capacitor/android@${{ matrix.capacitor }} + name: capacitor/android@${{ matrix.capacitor }} runs-on: ubuntu-latest @@ -52,7 +52,7 @@ jobs: capacitor-ios: - name: @capacitor/ios@${{ matrix.capacitor }} + name: capacitor/ios@${{ matrix.capacitor }} if: ${{ false }} runs-on: macos-latest From b3384129b8b64a277e38eeef6493f7ec4852afd5 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Sat, 6 May 2023 16:41:21 +1000 Subject: [PATCH 3/7] Update capacitor.yaml --- .github/workflows/capacitor.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml index 88d95547..d8449d6e 100644 --- a/.github/workflows/capacitor.yaml +++ b/.github/workflows/capacitor.yaml @@ -53,7 +53,6 @@ jobs: capacitor-ios: name: capacitor/ios@${{ matrix.capacitor }} - if: ${{ false }} runs-on: macos-latest strategy: From 0d50d23147287a632e45a825d218a3b46e7fe0b9 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Sat, 6 May 2023 16:44:04 +1000 Subject: [PATCH 4/7] Update capacitor.yaml --- .github/workflows/capacitor.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml index d8449d6e..8742dcc5 100644 --- a/.github/workflows/capacitor.yaml +++ b/.github/workflows/capacitor.yaml @@ -16,7 +16,7 @@ jobs: strategy: matrix: include: - - jdk: 16 + - jdk: 17 capacitor: latest node: 18.x - jdk: 11 @@ -80,4 +80,4 @@ jobs: npx cap add ios npx cap sync ios cd ios - # xcodebuild -workspace App/App.xcworkspace -scheme App -configuration Debug -sdk iphonesimulator -destination platform="iOS Simulator" + xcodebuild -workspace App/App.xcworkspace -scheme CapacitorCordova -configuration Debug -sdk iphonesimulator -destination platform="iOS Simulator" From 1dc72198a6c247fb4cee4fa2ac1ecef37b7cac1f Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Sat, 6 May 2023 16:50:14 +1000 Subject: [PATCH 5/7] Update capacitor.yaml --- .github/workflows/capacitor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml index 8742dcc5..8392f2ba 100644 --- a/.github/workflows/capacitor.yaml +++ b/.github/workflows/capacitor.yaml @@ -80,4 +80,4 @@ jobs: npx cap add ios npx cap sync ios cd ios - xcodebuild -workspace App/App.xcworkspace -scheme CapacitorCordova -configuration Debug -sdk iphonesimulator -destination platform="iOS Simulator" + xcodebuild -workspace App/App.xcworkspace -scheme CapacitorCordova -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=Any iOS Simulator Device" From 5a1b8b3dd3ab3e11807a99d771660d3be035c348 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Sat, 6 May 2023 16:54:04 +1000 Subject: [PATCH 6/7] Update capacitor.yaml --- .github/workflows/capacitor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml index 8392f2ba..55d3f27e 100644 --- a/.github/workflows/capacitor.yaml +++ b/.github/workflows/capacitor.yaml @@ -80,4 +80,4 @@ jobs: npx cap add ios npx cap sync ios cd ios - xcodebuild -workspace App/App.xcworkspace -scheme CapacitorCordova -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=Any iOS Simulator Device" + xcodebuild -workspace App/App.xcworkspace -scheme CapacitorCordova -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 14 Pro Max" From b5faf3e7354ebdef1284e35bfab8ffe14d907efe Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Sat, 6 May 2023 16:54:39 +1000 Subject: [PATCH 7/7] Update capacitor.yaml --- .github/workflows/capacitor.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml index 55d3f27e..2045893f 100644 --- a/.github/workflows/capacitor.yaml +++ b/.github/workflows/capacitor.yaml @@ -9,7 +9,7 @@ on: jobs: capacitor-android: - name: capacitor/android@${{ matrix.capacitor }} + name: android@${{ matrix.capacitor }} runs-on: ubuntu-latest @@ -52,7 +52,7 @@ jobs: capacitor-ios: - name: capacitor/ios@${{ matrix.capacitor }} + name: ios@${{ matrix.capacitor }} runs-on: macos-latest strategy: