Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Lint, test, and security audit
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true

- name: Verify Flutter installation
run: flutter --version

- name: Run CI checks
run: ./tool/ci.sh
130 changes: 130 additions & 0 deletions .github/workflows/release-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Build signed Android release artifacts and optionally deploy to Google Play.
# Requires repository secrets (see README "Release builds").
name: Release Android

on:
workflow_dispatch:
inputs:
deploy_track:
description: Play Store track (none = build only)
required: true
default: none
type: choice
options:
- none
- internal
- alpha
- beta
- production

concurrency:
group: release-android-${{ github.ref }}
cancel-in-progress: false

jobs:
build:
name: Build AAB and APK
runs-on: ubuntu-latest
timeout-minutes: 45

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true

- name: Configure Android signing
env:
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
ANDROID_KEY_STORE_PASSWORD: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
run: |
if [ -z "$ANDROID_KEYSTORE_BASE64" ]; then
echo "Missing ANDROID_KEYSTORE_BASE64 secret" >&2
exit 1
fi
echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > "$RUNNER_TEMP/upload-keystore.jks"
{
echo "storePassword=$ANDROID_KEY_STORE_PASSWORD"
echo "keyPassword=$ANDROID_KEY_PASSWORD"
echo "keyAlias=$ANDROID_KEY_ALIAS"
echo "storeFile=$RUNNER_TEMP/upload-keystore.jks"
} > android/key.properties

- name: Install Fastlane dependencies
working-directory: android
run: |
gem install bundler
bundle install

- name: Build release artifacts
working-directory: android
run: bundle exec fastlane build_android production:true

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: android-release
retention-days: 7
path: |
build/app/outputs/flutter-apk/app-release.apk
build/app/outputs/bundle/release/app-release.aab

deploy:
name: Deploy to Play Store
needs: build
if: ${{ inputs.deploy_track != 'none' }}
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: android-release
path: build/app/outputs

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
working-directory: android

- name: Write Play Store credentials
env:
PLAY_STORE_JSON_KEY: ${{ secrets.PLAY_STORE_JSON_KEY }}
run: |
if [ -z "$PLAY_STORE_JSON_KEY" ]; then
echo "Missing PLAY_STORE_JSON_KEY secret" >&2
exit 1
fi
echo "$PLAY_STORE_JSON_KEY" > "$RUNNER_TEMP/play-store.json"

- name: Deploy via Fastlane
working-directory: android
env:
SUPPLY_JSON_KEY: ${{ runner.temp }}/play-store.json
run: |
track="${{ inputs.deploy_track }}"
case "$track" in
internal) bundle exec fastlane deploy_android internal:true ;;
alpha) bundle exec fastlane deploy_android alpha:true ;;
beta) bundle exec fastlane deploy_android beta:true ;;
production) bundle exec fastlane deploy_android production:true ;;
*) echo "Unknown track: $track" >&2; exit 1 ;;
esac
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ ios/fastlane/metadata/review_information
ios/fastlane/metadata/trade_representative_contact_information

# Found over time
*.pbxproj
*.sqbpro
*.lock

# Flutter-generated iOS tooling (regenerated by flutter run/build)
ios/Flutter/ephemeral/

# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
161 changes: 0 additions & 161 deletions .gitlab-ci.yml

This file was deleted.

39 changes: 37 additions & 2 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,42 @@
# This file should be version controlled and should not be manually edited.

version:
revision: 6eaaf1650e671f9bbc6f34fba003cc5729f365b2
channel: master
revision: "ff37bef603469fb030f2b72995ab929ccfc227f0"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
base_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
- platform: android
create_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
base_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
- platform: ios
create_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
base_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
- platform: linux
create_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
base_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
- platform: macos
create_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
base_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
- platform: web
create_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
base_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
- platform: windows
create_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
base_revision: ff37bef603469fb030f2b72995ab929ccfc227f0

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
Loading
Loading