Skip to content

Update main.yml

Update main.yml #2

Workflow file for this run

name: Flutter build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.8' # 选择你的Flutter版本
- name: Get dependencies
run: flutter pub get
- name: Build for Android
run: flutter build apk --split-per-abi --release
- name: Build for web
run: flutter build web
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: build
path: |
build/app/outputs/flutter-apk/
build/web/