Skip to content

Commit

Permalink
ci: create flutter app bundle action
Browse files Browse the repository at this point in the history
  • Loading branch information
PiTrem committed Dec 7, 2023
1 parent b4156fd commit febe53f
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Flutter build appbundle

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.3'
- run: flutter pub get

- name: set local properties
run: |
echo "" >> ./android/local.properties
echo flutter.minSdkVersion=21 >> ./android/local.properties
echo flutter.targetSdkVersion=30 >> ./android/local.properties
echo flutter.compileSdkVersion=30 >> ./android/local.properties
- name: test
env:
TEST_INSTANCE_URL: ${{ secrets.TEST_INSTANCE_URL }}
run: |
echo "no testing"
# flutter packages pub run build_runner build
# flutter drive \
# [email protected] \
# --dart-define=ELN_PASSWORD=@complat \
# --dart-define=ELN_URL=$TEST_INSTANCE_URL
# --driver=test_driver/integration_test.dart \
# --target=integration_test/app_test.dart

- name: set key properties
#keyPassword="${{ secrets.KEY_PASSWORD }}"
#storePassword="${{ secrets.STORE_PASSWORD }}"
#keyAlias="${{ secrets.KEY_ALIAS }}
#storeFile=keystore.jks
run: |
echo keyPassword="${{ secrets.KEY_PASSWORD }}" > ./android/key.properties
echo storePassword="${{ secrets.STORE_PASSWORD }}" >> ./android/key.properties
echo keyAlias="${{ secrets.KEY_ALIAS }}" >> ./android/key.properties
echo storeFile=keystore.jks >> ./android/key.properties
echo "${{ secrets.KEY_JKS }}" | base64 --decode > ./android/app/keystore.jks
# - run: flutter build apk
- run: flutter build appbundle --debug

- name: Upload artefact
uses: actions/upload-artifact@v3
with:
name: appbundle
path: build/app/outputs/bundle/release/app-release.aab

0 comments on commit febe53f

Please sign in to comment.