chore: prepare release 0.0.1 #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flutter CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
workflow_dispatch: | |
# Ensure that new pushes/updates cancel running jobs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
format: | |
name: "Check formatting" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
cache: true | |
- name: Lint analysis | |
run: dart format --set-exit-if-changed . | |
lint: | |
name: "Static code analysis" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
cache: true | |
- name: "Get flutter dependencies" | |
run: dart pub get | |
- name: Lint analysis | |
run: dart analyze --fatal-warnings --fatal-infos | |
build-android: | |
name: "Build Android APK" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: example | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# sdk: [ '3.22.3', '' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.sdk }} | |
cache: true | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: "Get flutter dependencies" | |
run: dart pub get | |
- name: Build example APK | |
run: flutter build apk | |
- name: Upload apk as artifact | |
uses: actions/upload-artifact@v4 | |
if: ${{ matrix.sdk == '' }} | |
with: | |
name: maplibre-flutter-demo.apk | |
path: example/build/app/outputs/flutter-apk/app-release.apk | |
# build-iOS: | |
# name: Build iOS package | |
# runs-on: macos-latest | |
# defaults: | |
# run: | |
# working-directory: example | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# sdk: [ '3.22.3', '' ] | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: subosito/flutter-action@v2 | |
# with: | |
# flutter-version: ${{ matrix.sdk }} | |
# cache: true | |
# - uses: maxim-lobanov/setup-cocoapods@v1 | |
# with: | |
# podfile-path: example/ios/Podfile.lock | |
# - name: "Get flutter dependencies" | |
# run: dart pub get | |
# - name: Build iOS package | |
# run: flutter build ios --simulator | |
# - name: Upload Runner.app as artifact | |
# if: ${{ matrix.sdk == '' }} | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: maplibre-flutter-demo.app | |
# path: example/build/ios/iphonesimulator | |
build-web: | |
name: "Build web" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: example | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# sdk: [ '3.22.3', '' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.sdk }} | |
cache: true | |
- name: "Get flutter dependencies" | |
run: dart pub get | |
- name: Build web | |
run: flutter build web | |
# - name: Deploy to GitHub Pages | |
# if: github.repository_owner == 'josxha' | |
# uses: peaceiris/actions-gh-pages@v4 | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# publish_dir: example/build/web | |
# destination_dir: demo | |
# keep_files: true |