Skip to content

Commit

Permalink
feat: update workflows and polish health
Browse files Browse the repository at this point in the history
  • Loading branch information
Turtlepaw committed Aug 31, 2024
1 parent b9b6596 commit 922f315
Show file tree
Hide file tree
Showing 11 changed files with 353 additions and 256 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
on: workflow_dispatch
name: Build release APK
on:
workflow_dispatch:
inputs:
buildType:
description: 'Build Type'
required: true
default: 'apk'
type: choice
options:
- apk
- aab

name: Release

jobs:
build:
name: Build APK
name: Build APK/AAB
runs-on: ubuntu-latest

steps:
Expand All @@ -18,20 +29,28 @@ jobs:
channel: stable

- run: flutter pub get

- name: Decode keystore
run: echo "$KEYSTORE" | base64 --decode > android/app/keystore.jks
env:
KEYSTORE: ${{ secrets.KEYSTORE }}

- name: Build APK
run: flutter build apk --flavor ciRelease --release
- name: Build APK/AAB
run: |
if [ "${{ github.event.inputs.buildType }}" == "apk" ]; then
flutter build apk --flavor ciRelease --release
else
flutter build appbundle --flavor ciRelease --release
fi
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}

- name: Upload APK
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: APK
path: build/app/outputs/flutter-apk/app-cirelease-release.apk
name: ${{ github.event.inputs.buildType | upper }}
path: |
build/app/outputs/flutter-apk/app-cirelease-release.apk
build/app/outputs/bundle/release/app-cirelease-release.aab
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:fitness_challenges/components/bottomSheet.dart';
import 'package:fitness_challenges/components/challenge.dart';
import 'package:fitness_challenges/components/loader.dart';
import 'package:fitness_challenges/components/navBar.dart';
import 'package:fitness_challenges/create.dart';
import 'package:fitness_challenges/routes/create.dart';
import 'package:fitness_challenges/pb.dart';
import 'package:fitness_challenges/routes/join.dart';
import 'package:fitness_challenges/routes/settings.dart';
Expand Down Expand Up @@ -123,6 +123,7 @@ void main() async {
final manager = ChallengeProvider(pb: pb);
final healthManager = HealthManager(manager, pb);
manager.init();
healthManager.checkConnectionState();
healthManager.fetchHealthData();
Health().configure(useHealthConnectIfAvailable: true);

Expand Down
Loading

0 comments on commit 922f315

Please sign in to comment.