Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create GitHub Capacitor Actions #969

Merged
merged 7 commits into from
May 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/capacitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Capacitor

on:
workflow_dispatch:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
capacitor-android:
name: android@${{ matrix.capacitor }}

runs-on: ubuntu-latest

strategy:
matrix:
include:
- jdk: 17
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: ios@${{ matrix.capacitor }}
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 CapacitorCordova -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 14 Pro Max"