Skip to content
Merged
Show file tree
Hide file tree
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
52 changes: 37 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,58 @@
name: reader-sdk-flutter-plugin

on: [push]

env:
IOS_READER_SDK_VERSION: 1.7.4

jobs:
install-and-test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3

- 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'
- uses: subosito/flutter-action@v1

- name: Set up Flutter
uses: subosito/flutter-action@v1
with:
channel: 'stable' # or: 'beta', 'dev' or 'master'
- run: flutter pub get
# Android
- run: |
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}}
# #IOS
- run: |

- 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 1.6.1 > /dev/null
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
rm Pods && rm Podfile.lock

flutter pub get
pod update Firebase/CoreOnly
pod install --repo-update
xcodebuild -workspace Runner.xcworkspace -configuration Debug -scheme Runner -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14
CODE_SIGNING_ALLOWED=NO /
CODE_SIGNING_REQUIRED=NO /
CODE_SIGN_IDENTITY=NO"
xcodebuild -workspace Runner.xcworkspace -configuration Debug -scheme Runner -sdk iphoneos SKIP_SETUP_SCRIPT=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
2 changes: 1 addition & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "FRAMEWORKS=\"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n\"${FRAMEWORKS}/SquareReaderSDK.framework/setup\"\n\n";
shellScript = "# Skip the script in CI builds\nif [ \"$SKIP_SETUP_SCRIPT\" = \"YES\" ]; then\n exit 0\nfi\n\nFRAMEWORKS=\"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n\"${FRAMEWORKS}/SquareReaderSDK.framework/setup\"\n";
};
324E410A8DA310037B0B821B /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
Expand Down