Skip to content

Use class DefaultPathProvider #73

Use class DefaultPathProvider

Use class DefaultPathProvider #73

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
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
# with:
# flutter-version: '1.22.4'
# - run: flutter channel beta
# - run: flutter upgrade
- run: flutter config --enable-linux-desktop
- name: "Install dependencies"
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
- name: Build flutter app
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-linux.py
flutter build linux
find ./build/linux/x64/release/plugins -type f -name '*.so' -exec cp {} ./build/linux/x64/release/bundle/lib/ \;
- name: Save build Artifact
uses: actions/upload-artifact@v2
with:
name: LinuxBuild
path: './build/linux/x64/release/bundle'
- name: Build AppImage unsing appimage-builder
uses: docker://appimagecrafters/appimage-builder:0.8.5
with:
entrypoint: appimage-builder
args: --recipe ./AppImageBuilder.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