2020-10-06 23:50:23 +00:00
|
|
|
name: Flutter build
|
2020-10-06 23:02:21 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ yiffed ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
analyze:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get apt deps
|
|
|
|
run: |
|
|
|
|
sudo apt-get update > /dev/null
|
|
|
|
sudo apt-get -y install --no-install-recommends openssl axel lcov gcc g++ ninja-build
|
|
|
|
|
|
|
|
- name: Setup Flutter
|
|
|
|
uses: subosito/flutter-action@v1.3.2
|
|
|
|
with:
|
|
|
|
channel: beta
|
|
|
|
|
|
|
|
- name: Check formatting
|
|
|
|
run: flutter format lib/ test/ test_driver/ --set-exit-if-changed
|
|
|
|
|
|
|
|
- name: Analyze code
|
|
|
|
run: flutter analyze
|
|
|
|
|
|
|
|
|
|
|
|
deploy-web:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs: analyze
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get apt deps
|
|
|
|
run: |
|
|
|
|
sudo apt-get update > /dev/null
|
|
|
|
sudo apt-get -y install --no-install-recommends openssl axel lcov gcc g++ ninja-build
|
|
|
|
|
|
|
|
- name: Setup Flutter
|
|
|
|
uses: subosito/flutter-action@v1.3.2
|
|
|
|
with:
|
|
|
|
channel: beta
|
|
|
|
|
|
|
|
- name: Prepare env
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install curl -y
|
|
|
|
rm -r assets/js/package
|
|
|
|
cd assets/js/ && curl -L 'https://gitlab.com/famedly/libraries/olm/-/jobs/artifacts/master/download?job=build_js' > olm.zip && cd ../../
|
|
|
|
cd assets/js/ && unzip olm.zip && cd ../../
|
|
|
|
cd assets/js/ && rm olm.zip && cd ../../
|
|
|
|
cd assets/js/ && mv javascript package && cd ../../
|
|
|
|
cd web/ && rm sql-wasm.js sql-wasm.wasm && cd ../
|
|
|
|
cd web/ && curl -L 'https://github.com/sql-js/sql.js/releases/latest/download/sqljs-wasm.zip' > sqljs-wasm.zip && cd ../
|
|
|
|
cd web/ && unzip sqljs-wasm.zip && cd ../
|
|
|
|
cd web/ && rm sqljs-wasm.zip && cd ../
|
|
|
|
flutter clean
|
|
|
|
|
|
|
|
- name: Configure Flutter
|
|
|
|
run: flutter config --enable-web && flutter doctor
|
|
|
|
|
|
|
|
- run: flutter pub get
|
|
|
|
|
|
|
|
- name: Build web release
|
|
|
|
run: flutter build web --release --verbose
|
|
|
|
|
2020-10-07 21:13:02 +00:00
|
|
|
- name: Add CNAME
|
|
|
|
run: cd build/web/ && echo "chat.inex.dev" > CNAME && cd ../..
|
|
|
|
|
2020-10-06 23:02:21 +00:00
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
uses: crazy-max/ghaction-github-pages@v2
|
|
|
|
with:
|
|
|
|
target_branch: gh-pages
|
|
|
|
build_dir: build/web/
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
build-android-apk:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs: analyze
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get apt deps
|
|
|
|
run: |
|
|
|
|
sudo apt-get update > /dev/null
|
2020-10-06 23:50:23 +00:00
|
|
|
sudo apt-get -y install --no-install-recommends openssl axel lcov gcc g++ ninja-build
|
2020-10-06 23:02:21 +00:00
|
|
|
|
|
|
|
- name: Setup Flutter
|
|
|
|
uses: subosito/flutter-action@v1.3.2
|
|
|
|
with:
|
|
|
|
channel: beta
|
|
|
|
|
|
|
|
- name: Set up secrets
|
2020-10-06 23:46:21 +00:00
|
|
|
env:
|
|
|
|
SIGN_KEY: ${{ secrets.SIGN_KEY }}
|
|
|
|
SIGN_KEY_PASS: ${{ secrets.SIGN_KEY_PASS }}
|
|
|
|
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }}
|
2020-10-06 23:02:21 +00:00
|
|
|
run: |
|
|
|
|
cd android && echo $SIGN_KEY | base64 --decode --ignore-garbage > key.jks && cd ..
|
|
|
|
cd android && echo "storePassword=${SIGN_KEY_PASS}" >> key.properties && cd ..
|
|
|
|
cd android && echo "keyPassword=${SIGN_KEY_PASS}" >> key.properties && cd ..
|
|
|
|
cd android && echo "keyAlias=key" >> key.properties && cd ..
|
|
|
|
cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
|
|
|
|
cd android/app && echo $GOOGLE_SERVICES >> google-services.json && cd ../..
|
|
|
|
|
|
|
|
- name: Get Flutter deps
|
|
|
|
run: flutter pub get
|
|
|
|
|
|
|
|
- name: Build release apk
|
|
|
|
run: |
|
|
|
|
flutter build apk --release
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-10-09 14:31:41 +00:00
|
|
|
name: FurryChat-Android
|
2020-10-06 23:02:21 +00:00
|
|
|
path: build/app/outputs/apk/release/app-release.apk
|
|
|
|
|
|
|
|
build-linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs: analyze
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get apt deps
|
|
|
|
run: |
|
|
|
|
sudo apt-get update > /dev/null
|
|
|
|
sudo apt-get -y install --no-install-recommends openssl axel lcov gcc g++ ninja-build clang cmake pkg-config libgtk-3-dev libblkid-dev tar
|
|
|
|
|
|
|
|
- name: Setup Flutter
|
|
|
|
uses: subosito/flutter-action@v1.3.2
|
|
|
|
with:
|
|
|
|
channel: dev
|
|
|
|
|
|
|
|
- name: Get Flutter deps
|
|
|
|
run: |
|
|
|
|
flutter config --enable-linux-desktop
|
|
|
|
flutter pub get
|
|
|
|
|
2020-10-06 23:46:21 +00:00
|
|
|
- name: Build release package
|
2020-10-06 23:02:21 +00:00
|
|
|
run: |
|
|
|
|
flutter build linux --release
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-10-07 21:13:02 +00:00
|
|
|
name: FurryChat-Linux
|
|
|
|
path: build/linux/release/bundle/
|
2020-10-07 00:05:11 +00:00
|
|
|
|
|
|
|
build-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
2020-10-09 14:31:41 +00:00
|
|
|
needs: analyze
|
2020-10-07 00:05:11 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get choco deps
|
|
|
|
run: |
|
|
|
|
choco install git -y
|
|
|
|
choco install visualstudio2019community -y --package-parameters "--add Microsoft.VisualStudio.Product.BuildTools --includeRecommended --includeOptional --passive --locale en-US"
|
|
|
|
|
|
|
|
- name: Setup Flutter
|
|
|
|
uses: subosito/flutter-action@v1.3.2
|
|
|
|
with:
|
|
|
|
channel: dev
|
|
|
|
|
|
|
|
- name: Get Flutter deps
|
|
|
|
run: |
|
|
|
|
flutter config --enable-windows-desktop
|
|
|
|
flutter pub get
|
|
|
|
|
|
|
|
- name: Build release package
|
|
|
|
run: |
|
|
|
|
flutter build windows --release
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: FurryChat-Windows
|
|
|
|
path: build/windows/runner/Release/
|