Skip to content

chore(settings): ignore deprecated onReorder warning to fix CI build #141

chore(settings): ignore deprecated onReorder warning to fix CI build

chore(settings): ignore deprecated onReorder warning to fix CI build #141

Workflow file for this run

name: Flutter CI
on:
push:
branches: [master]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
defaults:
run:
working-directory: flutter
steps:
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Test with coverage
run: flutter test --coverage
- name: Upload coverage artifact
uses: actions/upload-artifact@v5
with:
name: flutter-coverage
path: flutter/coverage/lcov.info
build-beta:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
defaults:
run:
working-directory: flutter
permissions:
contents: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Test
id: tests
continue-on-error: true
run: flutter test
- name: Update golden files if tests failed
if: steps.tests.outcome == 'failure'
run: flutter test test/golden/golden_test.dart --update-goldens
- name: Commit updated golden files
if: steps.tests.outcome == 'failure'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add test/golden/goldens/
if git diff --cached --quiet; then
echo "No golden changes to commit"
else
git commit -m "ci: auto-update golden files"
git push
fi
- name: Generate version tag
id: version
run: |
SHORT_SHA=$(git rev-parse --short HEAD)
TIMESTAMP=$(date +%Y%m%d-%H%M)
COMMIT_MSG=$(git log -1 --pretty=%s | head -c 80 | tr '\n' ' ')
echo "tag=beta-${TIMESTAMP}-${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "name=Beta ${TIMESTAMP} (${SHORT_SHA})" >> $GITHUB_OUTPUT
echo "commit_msg=${COMMIT_MSG}" >> $GITHUB_OUTPUT
- name: Decode Keystore
run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/upload-keystore.jks
- name: Create key.properties
run: |
echo "storePassword=${{ secrets.STORE_PASSWORD }}" > android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
echo "storeFile=upload-keystore.jks" >> android/key.properties
- name: Build release APK
run: flutter build apk --release --dart-define=STRAVA_CLIENT_ID=193995
- name: Build release AAB
run: flutter build appbundle --release --dart-define=STRAVA_CLIENT_ID=193995
- name: Rename APK
run: |
TAG="${{ steps.version.outputs.tag }}"
mv build/app/outputs/flutter-apk/app-release.apk \
build/app/outputs/flutter-apk/RunFlow-${TAG}.apk
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag }}
name: ${{ steps.version.outputs.name }}
body: |
## RunFlow Beta Build
**Commit:** `${{ github.sha }}`
**Message:** ${{ steps.version.outputs.commit_msg }}
**Branch:** `${{ github.ref_name }}`
**Built:** ${{ github.event.head_commit.timestamp }}
### Installation
Download the APK below and install on your Android device. You may need to enable "Install from unknown sources" in your device settings.
> **Note:** This is a beta release. Expect potential instability.
prerelease: true
files: |
flutter/build/app/outputs/flutter-apk/RunFlow-${{ steps.version.outputs.tag }}.apk
flutter/build/app/outputs/bundle/release/app-release.aab