Skip to content

nightly_build

nightly_build #499

name: nightly_build
on:
workflow_dispatch:
schedule:
- cron: "40 2 * * *" # 02:40 am every day
jobs:
test:
runs-on: macos-15
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 16.4
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Run flutter doctor
run: flutter doctor -v
- name: Install dependencies
run: flutter pub get
- name: Flutter test
id: test
run: flutter test
- name: Upload goldens if tests fail
uses: actions/upload-artifact@v5
if: ${{ failure() && steps.test.conclusion == 'failure' }}
with:
name: goldens
path: test/failures/
retention-days: 1
build-android:
name: Build Android
runs-on: ubuntu-latest
needs: [ test ]
defaults:
run:
working-directory: example
steps:
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
channel: stable
- uses: actions/setup-java@v5
with:
java-version: "21"
distribution: "temurin"
cache: "gradle"
- run: flutter pub get
- name: Build appbundle
run: flutter build appbundle --profile --no-pub
build-iOS:
name: Build iOS
needs: [ test ]
runs-on: macos-15
defaults:
run:
working-directory: example
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 16.4
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter pub get
- name: Build iOS package
run: flutter build ios --simulator