version: Update version (1.31.1) #1789
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: CI | |
on: | |
pull_request: | |
branches: | |
- 'dev' | |
merge_group: | |
workflow_dispatch: | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' | |
- name: Formatting | |
run: dart format --output=none --set-exit-if-changed . | |
- name: Preprocess | |
run: | | |
cd lib/server | |
wget -q ${{ secrets.SECRET_SALT }} || echo 'String getValid(String vToken) { return vToken; }' > salt.dart | |
wget -q ${{ secrets.SECRET_WSALT }} || echo 'String getValid(String vToken) { return vToken; }' > wsalt.dart | |
- name: Analyze | |
run: flutter analyze --no-fatal-infos | |
ios-build: | |
runs-on: macos-latest | |
needs: [ format ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'beta' | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Preprocess | |
run: | | |
cd lib/server | |
wget -q ${{ secrets.SECRET_SALT }} || echo 'String getValid(String vToken) { return vToken; }' > salt.dart | |
wget -q ${{ secrets.SECRET_WSALT }} || echo 'String getValid(String vToken) { return vToken; }' > wsalt.dart | |
cd ../.. | |
python3 preprocess-ios.py | |
- name: Podfile | |
run: | | |
cd ios | |
rm Podfile.lock | |
flutter clean | |
flutter pub get | |
pod install | |
pod update | |
cd .. | |
- name: Build | |
run: | | |
flutter build ios --release --no-codesign | |
mkdir -p Payload | |
mv ./build/ios/iphoneos/Runner.app Payload | |
zip -r -y Payload.zip Payload/Runner.app | |
mv Payload.zip Payload.ipa | |
- name: Upload IPA | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ipa-build | |
path: Payload.ipa | |
android-build: | |
runs-on: ubuntu-latest | |
needs: [ format ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'beta' | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Preprocess | |
run: | | |
cd lib/server | |
wget -q ${{ secrets.SECRET_SALT }} || echo 'String getValid(String vToken) { return vToken; }' > salt.dart | |
wget -q ${{ secrets.SECRET_WSALT }} || echo 'String getValid(String vToken) { return vToken; }' > wsalt.dart | |
cd ../.. | |
python3 preprocess-android.py | |
- name: Build | |
run: | | |
flutter clean | |
flutter build apk --release | |
- name: Upload APK | |
uses: actions/upload-artifact@v2 | |
with: | |
name: apk-build | |
path: ./build/app/outputs/apk/release/app-release.apk |