Skip to content

Commit

Permalink
[CHORE] Update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
TinoGuo committed Jul 6, 2024
1 parent 46ad857 commit 6135072
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 104 deletions.
96 changes: 0 additions & 96 deletions .github/workflows/dart.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Flutter Build Test CI

on:
schedule:
- cron: '0 8 1/7 * *'
push:
branches:
- master
pull_request:

jobs:
build-and-test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest]
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- if: matrix.os == 'macos-latest'
name: set java
uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '11'
- name: flutter hotbake
run: |
flutter doctor --verbose
flutter pub get
flutter analyze
flutter test
- name: build platform directory
working-directory: ./example
run: flutter create .
# build example
- name: build android example
working-directory: ./example
run: flutter build appbundle
- if: matrix.os == 'macos-latest'
name: build ios example
working-directory: ./example
run: flutter build ios --release --no-codesign
- name: build web example
working-directory: ./example
run: flutter build web
- if: ${{ matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' }}
name: deploy
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: example/build/web # The folder the action should deploy.
16 changes: 8 additions & 8 deletions example/.metadata
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: 796c8ef79279f9c774545b3771238c3098dbefab
channel: stable
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
- platform: macos
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: android
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49

# User provided section

Expand Down

0 comments on commit 6135072

Please sign in to comment.