人话讲下如何用github actions编译flutter应用-以编译windows为例

actions的脚本看下这个,有简单的说明,有关于编译个平台的脚本:

https://github.com/marketplace/actions/flutter-action

打开你要编译的项目点击那个Actions按钮

然后随便点击一个脚本会跳到白框编辑界面

打开上文提到的网址随便抄下就ok

然后点击右边的commit,再次点击actions

== In progress 跑完就是了

看下我的

复制代码
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Build Flutter Windows App

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

jobs:
  main:
    runs-on: windows-latest
    steps:
      - name: Clone repository
        uses: actions/checkout@v4
      - name: Set up Flutter
        uses: subosito/flutter-action@v2
        with:
          channel: stable
      - run: flutter build windows
      - name: Upload Build Artifact
        uses: actions/upload-artifact@v2
        with:
              name: windows-build-artifact
              path: build/windows/x64/runner/Release/**
相关推荐
里欧跑得慢3 小时前
Flutter 测试全攻略:从单元测试到集成测试的完整实践
前端·css·flutter·web
键盘鼓手苏苏7 小时前
Flutter 三方库 pip 的鸿蒙化适配指南 - 实现标准化的画中画(Picture-in-Picture)模式、支持视频悬浮窗与多任务并行交互
flutter·pip·harmonyos
左手厨刀右手茼蒿7 小时前
Flutter 组件 sheety_localization 的适配 鸿蒙Harmony 实战 - 驾驭在线协作式多语言管理、实现鸿蒙端动态词条下发与全球化敏捷发布方案
flutter·harmonyos·鸿蒙·openharmony·sheety_localization
见山是山-见水是水8 小时前
鸿蒙flutter第三方库适配 - 路由书签应用
flutter·华为·harmonyos
火柴就是我8 小时前
记录一些跨平台开发需要的鸿蒙知识
flutter·harmonyos
Tong Z8 小时前
Flutter中的三种通道
flutter
空中海9 小时前
2.3 组件复用与组合
flutter·dart
你听得到1110 小时前
Get 这波之后,我把 Flutter 状态管理重新看了一遍:新项目到底该选谁?
前端·flutter·架构
键盘鼓手苏苏11 小时前
Flutter 三方库 persistent_cache_simple 的鸿蒙化适配指南 - 实现具备磁盘溢出淘汰与极简 API 的本地持久化缓存、支持端侧资源异步落地与状态秒开实战
flutter·缓存·harmonyos