ci: fix reusable workflows (#32) #124
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: build | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build_android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: ./.github/actions/flutter-setup | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
cache: "gradle" | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Cache Android SDK | |
id: androidSdk | |
uses: actions/cache@v4 | |
with: | |
path: ~/Android/Sdk | |
key: androidSdk | |
- name: Build android | |
run: cd example/ && flutter build apk | |
build_ios: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: ./.github/actions/flutter-setup | |
- uses: SwiftyLab/setup-swift@latest | |
with: | |
swift-version: "5.10.0" | |
- name: Get Swift Version | |
run: swift --version | |
- name: Get Xcode version | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.4.app | |
run: xcodebuild -version | |
- name: Pod install | |
run: cd example/ios ; pod install | |
- name: Cache Pods | |
id: pods | |
uses: actions/cache@v4 | |
with: | |
path: example/ios/Pods | |
key: pods-cache--${{ hashFiles('example/ios/podfile.lock') }} | |
- name: Cache Xcode DerivedData | |
uses: irgaly/[email protected] | |
with: | |
key: xcode-deriveddata | |
- name: Build ios | |
run: cd example/ && flutter build ios --simulator | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.4.app |