Merge pull request #119 from square/brandonjenniges/ci_fix #144
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: reader-sdk-flutter-plugin | |
on: [push] | |
env: | |
IOS_READER_SDK_VERSION: 1.7.4 | |
jobs: | |
install-and-test: | |
runs-on: macos-latest | |
steps: | |
- name: Cleanup | |
run: | | |
sudo rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
sudo rm -rf ~/Library/Developer/Xcode/Archives/* | |
sudo rm -rf ~/Library/Caches/* | |
sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/* | |
sudo rm -rf /Users/runner/Library/Developer/CoreSimulator/Caches/* | |
sudo rm -rf /Users/runner/Library/Developer/CoreSimulator/Devices/* | |
sudo rm -rf /Users/runner/.gradle/caches | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Android | |
run: | | |
cd example | |
flutter pub get | |
cd android | |
./gradlew clean build -PSQUARE_READER_SDK_APPLICATION_ID=${{secrets.SQUARE_READER_SDK_APPLICATION_ID}} -PSQUARE_READER_SDK_REPOSITORY_PASSWORD=${{secrets.SQUARE_READER_SDK_REPOSITORY_PASSWORD}} | |
- name: iOS | |
run: | | |
cd example | |
flutter pub get | |
cd ios | |
ruby <(curl https://connect.squareup.com/readersdk-installer) install --app-id ${{secrets.SQUARE_READER_SDK_APPLICATION_ID}} --repo-password ${{secrets.SQUARE_READER_SDK_REPOSITORY_PASSWORD}} --version $IOS_READER_SDK_VERSION > /dev/null | |
flutter clean | |
flutter pub get | |
pod update Firebase/CoreOnly | |
pod install --repo-update | |
xcodebuild -workspace Runner.xcworkspace -configuration Debug -scheme Runner -sdk iphoneos SKIP_SETUP_SCRIPT=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO |