Skip to content

Add setState for watch log #177

Add setState for watch log

Add setState for watch log #177

Workflow file for this run

name: Build android/ios
on:
push:
branches: [ dev ]
workflow_dispatch:
merge_group:
jobs:
ios-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
ref: dev
- uses: subosito/flutter-action@v2
with:
# flutter-version: '2.5.2'
channel: 'stable'
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Preprocess
run: |
# cd lib/server
# wget -q ${{ secrets.SECRET_SALT }}
# wget -q ${{ secrets.SECRET_WSALT }}
# cd ../..
cat << EOF > lib/server/salt.dart
String getValid(foo) {return foo;}
EOF
cat << EOF > lib/server/wsalt.dart
String getValid(foo) {return foo;}
EOF
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
# https://github.com/AppImageCrafters/appimage-builder-flutter-example/blob/main/.github/workflows/appimage.yml
# linux-build:
# runs-on: ubuntu-20.04
# strategy:
# matrix:
# include:
# # - arch: armv7
# # distro: ubuntu20.04
# - arch: aarch64
# distro: ubuntu20.04
# - arch: x86_64
# distro: ubuntu20.04
# steps:
# - uses: actions/checkout@v2
# - uses: subosito/flutter-action@v1
# if: ${{ matrix.arch == 'x86_64' }}
# # with:
# # flutter-version: '1.22.4'
# # - run: flutter channel beta
# # - run: flutter upgrade
# - name: flutter config --enable-linux-desktop on host
# run: flutter config --enable-linux-desktop
# if: ${{ matrix.arch == 'x86_64' }}
# - name: "Install dependencies"
# if: ${{ matrix.arch == 'x86_64' }}
# run: |
# sudo apt-get update
# sudo apt-get install -y cmake ninja-build build-essential pkg-config curl file git unzip xz-utils zip libgtk-3-dev
# - run: echo ${{ github.event.repository.name }}
# - name: Build for linux/${{ matrix.arch }} using uraimo/run-on-arch-action
# if: ${{ matrix.arch != 'x86_64' }}
# uses: uraimo/run-on-arch-action@v2
# with:
# arch: ${{ matrix.arch }}
# distro: ${{ matrix.distro }}
# # https://github.com/uraimo/run-on-arch-action/issues/34
# setup: |
# mkdir -p "${PWD}/build"
# dockerRunArgs: |
# --volume "${PWD}/build:/home/${USER}/${{ github.event.repository.name }}/${{ github.event.repository.name }}/build"
# run: |
# bash << EOF
# if [ "${{ matrix.arch }}" == "armv7" ];then
# chmod +x ./assets/p7zip/linux/armv7/7zr
# ./assets/p7zip/linux/armv7/7zr
# fi
# EOF
# apt-get update > /dev/null
# apt-get install -y clang cmake ninja-build build-essential pkg-config curl wget file git unzip xz-utils zip libgtk-3-dev > /dev/null
# # cd lib/server
# # wget -q ${{ secrets.SECRET_SALT }}
# # wget -q ${{ secrets.SECRET_WSALT }}
# # cd ../..
# cat << EOF > lib/server/salt.dart
# String getValid(foo) {return foo;}
# EOF
# cat << EOF > lib/server/wsalt.dart
# String getValid(foo) {return foo;}
# EOF
# bash << EOF
# if [ "${{ matrix.arch }}" == "aarch64" ];then
# git clone https://github.com/flutter/flutter.git
# export PATH=$PATH:$(pwd)/flutter/bin
# flutter doctor -v
# flutter config --enable-linux-desktop
# python preprocess-linux.py
# flutter build linux
# find ./build/linux/*/release/plugins -type f -name '*.so' -exec cp {} ./build/linux/*/release/bundle/lib/ \;
# fi
# EOF
# - name: Build for linux/${{ matrix.arch }} on host
# if: ${{ matrix.arch == 'x86_64' }}
# run: |
# git clone https://github.com/flutter/flutter.git
# export PATH=$PATH:$(pwd)/flutter/bin
# flutter doctor -v
# # cd lib/server
# # wget -q ${{ secrets.SECRET_SALT }}
# # wget -q ${{ secrets.SECRET_WSALT }}
# # cd ../..
# cat << EOF > lib/server/salt.dart
# String getValid(foo) {return foo;}
# EOF
# cat << EOF > lib/server/wsalt.dart
# String getValid(foo) {return foo;}
# EOF
# python3 preprocess-linux.py
# echo flutter build linux
# flutter build linux
# find ./build -type f -name '*.so'
# find ./build/linux/*/release/plugins -type f -name '*.so' -exec cp {} ./build/linux/*/release/bundle/lib/ \;
# find ./build -type f -name '*.so'
# - run: find ./build -type f -name '*.so'
# - name: Build AppImage unsing appimage-builder
# uses: docker://appimagecrafters/appimage-builder:0.8.5
# with:
# entrypoint: appimage-builder
# args: --recipe ./AppImageBuilder-${{ matrix.arch }}.yml --skip-test
# - name: Save build Artifact
# uses: actions/upload-artifact@v2
# with:
# name: AppImage
# path: './*.AppImage*'
# # - name: Release AppImage
# # uses: marvinpinto/action-automatic-releases@latest
# # with:
# # title: Continuous build
# # automatic_release_tag: 'continuous'
# # prerelease: true
# # draft: false
# # files: './*.AppImage*'
# # repo_token: ${{ secrets.GITHUB_TOKEN }}
# android-build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# ref: dev
# - uses: actions/setup-java@v1
# with:
# java-version: '12.x'
# - uses: subosito/flutter-action@v1
# with:
# # flutter-version: '2.5.2'
# channel: 'stable'
# - uses: actions/setup-python@v2
# with:
# python-version: '3.8'
# - name: Preprocess
# run: |
# # cd lib/server
# # wget -q ${{ secrets.SECRET_SALT }}
# # wget -q ${{ secrets.SECRET_WSALT }}
# # cd ../..
# cat << EOF > lib/server/salt.dart
# String getValid(foo) {return foo;}
# EOF
# cat << EOF > lib/server/wsalt.dart
# String getValid(foo) {return foo;}
# EOF
# 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