Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Opinionated GitHub Action workflows for Flutter projects

NotificationsYou must be signed in to change notification settings

zgosalvez/github-actions-flutter-workflows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This sample project allows you to leverage GitHub Actions to run common Flutter workflows. These are based on the workflows found in theFlutter Gallery repository. Continue reading to apply these to your Flutter project.

Disclaimer

This is still in active development, and it currently supports iOS and Android deployments only. Pleaseopen a pull request to support other platforms.

Usage

Create workflows in your.github/workflows directory. Examples are available in this repository. For more information, see the GitHub Help Documentation forCreating a workflow file.

Note: Although this Flutter project works as-is, consider tailoring these workflows to your needs. If you're starting from scratch, copying and pasting will work as long as you follow theGitHub flow andrelease based workflow.

Protected Branches

Recommended rules for themain andrelease/v* branches:

  • Require status checks to pass before merging
    • Require branches to be up to date before merging
    • Check security hardening
    • Generate coverage report
    • Run static testing
    • Run unit testing
    • Run widget testing

Workflows

Continuous Integration

CI

.github/workflows/ci.yml

Also known as CI, Continuous Integration runs Flutter static and dynamic tests onevery pull request tomain andrelease/v*, then the coverage report is stored as an artifact for reference. A comment is added to the pull request on every run as seen here,#10 (comment). Modify the workflow to further process the code coverage file usingcode quality orcode review actions.

Testing is split into unit and widget tests. These are found in thetest/units andtest/widgets directories, respectively. The CI runs these in parallel to optimize for workflow throughput, especially on a large project with a considerable number of test cases.

Continuous Delivery

CDelivery

.github/workflows/cdelivery.yml

Also known as CDelivery (not to be mistaken with another CD, i.e., Continuous Deployment), Continuous Delivery drafts a pre-release onevery push tomain. For the draft to populate with the release notes, pull requests should bemain based. Manually remove the pre-release mark after it has been deployed and released to the app store.

.github/workflows/pull_request-opened.yml

To draft the release this workflow uses theRelease Drafter action to compile the pull requests and categorizes it using thePR Labeler action. Add the.github/release-drafter.yml and.github/pr-labeler.yml files in your project since these are required configurations for these actions, respectively. Customize the configuration files as needed.

Deployment

Deployment

.github/workflows/deployment.yml

Deployment is triggered when the release draft (or any release) is published. It reruns the same Flutter static and dynamic tests from the CI before running Flutter's build commands. The app version used is based on the release tag, not the name. Lastly, build artifacts are uploaded as release assets.

Dependabot

This includes a.github/dependabot.yml file that allows Dependabot to maintain the GitHub Actions used in these workflows. For more information, see the GitHub Documentation forKeeping your dependencies updated automatically.

License

The scripts and documentation in this project are released under theMIT License

About

Opinionated GitHub Action workflows for Flutter projects

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp