用户只需要在自己 Github 的开源项目下创建.github/workflows脚本就可以完成接入,另外针对 Github Actions 官方还提供了marketplace用于开发者提交或者引用别人写好的 aciton ,「所以很多时候开发者在使用 Github Actions 时,其实会变成了在marketplace里挑选和组合 action 的场景。当然,这样各有利弊,后面我们会讲到」。
下面用一个示例项目来说明如何使用 Github Actions 发布 Flutter 应用,先放成果地址 首先创建一个 Flutter 项目 flutter create flutter_github_actions 添加一个配置文件.github/workflows/main.yml 配置工作流程,将代码推送到 Github # main.yml # 工作流程的名字 name: Test, Build and Release apk # 工作流程触...
flutter build ipa --release --export-options-plist ios/GithubActionsExportOptions.plist 4. Usage name:Build and distributeon:push:branches: -mainjobs:build:name:buildruns-on:macos-lateststeps: -uses:actions/checkout@v2-uses:cedvdb/action-flutter-build-ios@v1with:#always use --export-options-...
-run:flutter pub get-run:flutter build apk--release--target-platform=android-arm64--no-shrink-name:Upload APKuses:actions/upload-artifact@v2with:name:apkpath:build/app/outputs/apk/release/app-release.apkrelease:name:Release APKneeds:apkif:startsWith(github.ref,'refs/tags/')runs-on:ubuntu-lat...
{ secrets.CLIENT_SECRET }}";}-run:flutter pub get-run:flutter build apk--release--target-platform=android-arm64--no-shrinkapk:name:GenerateAPKif:startsWith(github.ref,'refs/tags/')runs-on:ubuntu-lateststeps:-name:Checkoutuses:actions/checkout@v2-name:SetupJDKuses:actions/setup-java@v2with...
build: name:Build runs-on:ubuntu-latest steps: -uses:actions/checkout@v2 -uses:actions/setup-java@v2 with: distribution:'zulu' java-version:11 -uses:subosito/flutter-action@v1 with: flutter-version:'2.8.1' -uses:finnp/create-file-action@master ...
name:Build and Deploy iOSon:push:branches:-mainjobs:build:runs-on:macos-lateststeps:-name:Checkout codeuses:actions/checkout@v2-name:Setup Flutteruses:subosito/flutter-action@v2with:flutter-version:'2.5.2'-name:Install dependenciesrun:flutter pub get-name:Build iOSrun:flutter build ios--releas...
build_deploy.yaml文件: name:build_and_deploy on:pull_request:types:[opened,synchronize,reopened,ready_for_review,closed]workflow_dispatch:jobs:job_check:name:Testruns-on:ubuntu-latestif:${{github.event.action!='closed'}}steps:-name:CheckoutCodeuses:actions/checkout@v3-name:SetupFlutteruses:sub...
name:No Free usage issue checkeron:issues:types:[opened,reopened]jobs:build:runs-on:ubuntu-lateststeps:-uses:actions/checkout@v2-name:Check issue actoruses:fluttercandies/no-free-usage-action@v1.0.1with:token:${{secrets.GITHUB_TOKEN}}# 由GitHub提供的临时Token,必须在此处进行传递,且必须为这个值...
Flutter is a fully open-source project, and we welcome contributions. Information on how to get started can be found in ourcontributor guide. About Flutter makes it easy and fast to build beautiful apps for mobile and beyond flutter.dev ...