人话讲下如何用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/**
相关推荐
Jinkey2 小时前
FlutterBasic - GetBuilder、Obx、GetX<Controller>、GetxController 有啥区别
android·flutter·ios
Summer不秃6 小时前
Flutter之使用mqtt进行连接和信息传输的使用案例
前端·flutter
旭日猎鹰6 小时前
Flutter踩坑记录(二)-- GestureDetector+Expanded点击无效果
前端·javascript·flutter
sunly_6 小时前
Flutter:AnimatedSwitcher当子元素改变时,触发动画
flutter
AiFlutter6 小时前
Flutter封装Coap
flutter
旭日猎鹰12 小时前
Flutter踩坑记录(三)-- 更改入口执行文件
flutter
旭日猎鹰12 小时前
Flutter踩坑记录(一)debug运行生成的项目,不能手动点击运行
flutter
️ 邪神12 小时前
【Android、IOS、Flutter、鸿蒙、ReactNative 】自定义View
flutter·ios·鸿蒙·reactnative·anroid
比格丽巴格丽抱1 天前
flutter项目苹果编译运行打包上线
flutter·ios
SoaringHeart1 天前
Flutter进阶:基于 MLKit 的 OCR 文字识别
前端·flutter