Skip to content

Commit

Permalink
Android build test
Browse files Browse the repository at this point in the history
hmziqrs committed Sep 26, 2024

Unverified

This user has not yet uploaded their public signing key.
1 parent 4376126 commit e0abf2f
Showing 1 changed file with 62 additions and 59 deletions.
121 changes: 62 additions & 59 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -5,41 +5,41 @@ on:

name: Release Builds
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
channel: 'stable'
# linux:
# name: Linux
# runs-on: ubuntu-latest
# steps:
# - name: Set up Flutter
# uses: subosito/flutter-action@v2
# with:
# flutter-version: '3.22.2'
# channel: 'stable'

- uses: actions/checkout@v4
with:
path: 'app'
# - uses: actions/checkout@v4
# with:
# path: 'app'

- name: Install required build tools for linux
run: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
# - name: Install required build tools for linux
# run: |
# sudo apt-get update -y
# sudo apt-get upgrade -y
# sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa
# sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev

- run: |
cd app
flutter config --enable-linux-desktop
flutter pub get
flutter build linux --release
cd build/linux/release
zip -r linux-release.zip bundle
# - run: |
# cd app
# flutter config --enable-linux-desktop
# flutter pub get
# flutter build linux --release
# cd build/linux/release
# zip -r linux-release.zip bundle

- name: Create linux Release
uses: ncipollo/release-action@v1
with:
artifacts: 'app/build/linux/release/linux-release.zip'
token: ${{ secrets.TOKEN }}
allowUpdates: true
# - name: Create linux Release
# uses: ncipollo/release-action@v1
# with:
# artifacts: 'app/build/linux/release/linux-release.zip'
# token: ${{ secrets.TOKEN }}
# allowUpdates: true

web:
name: Web
@@ -51,7 +51,6 @@ jobs:
flutter-version: '3.22.2'
channel: 'stable'

- run: echo `pwd`"/flutter/bin" >> $GITHUB_PATH

- uses: actions/checkout@v4
with:
@@ -77,33 +76,37 @@ jobs:
PROJECT_PATH: 'app'
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}

# android:
# name: Android
# runs-on: ubuntu-latest
# steps:
# - run: |
# git clone https://github.com/flutter/flutter.git
# cd flutter
# git checkout 72aa23eb93
# - run: echo `pwd`"/flutter/bin" >> $GITHUB_PATH
# - uses: actions/setup-java@v1
# with:
# java-version: '12.x'
# - name: Install NDK
# run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT}
# - uses: actions/checkout@v2
# with:
# path: 'app'
# - run: |
# cd app
# flutter pub get
# flutter build apk -t lib/main.firebase.dart --release
# - name: Create Android Release
# uses: ncipollo/release-action@v1
# with:
# artifacts: 'app/build/app/outputs/apk/release/app-release.apk'
# token: ${{ secrets.TOKEN }}
# allowUpdates: true
android:
name: Android
runs-on: ubuntu-latest
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
channel: 'stable'

- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# - name: Install NDK
# run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT}
- uses: actions/checkout@v4
with:
path: 'app'
- run: |
cd app
flutter pub get
flutter build apk -t lib/main.firebase.dart --release
- name: Create Android Release
uses: ncipollo/release-action@v1
with:
artifacts: 'app/build/app/outputs/apk/release/app-release.apk'
token: ${{ secrets.TOKEN }}
allowUpdates: true

# macos:
# name: MacOS

0 comments on commit e0abf2f

Please sign in to comment.