Skip to content

Commit 9bd8128

Browse files
authored
Fixes release notes with GitHub flow (#10)
1 parent e5e622e commit 9bd8128

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

.github/README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
11
# GitHub Actions: Flutter Workflows
22

3-
This sample project allows you to leverage GitHub Actions to run common Flutter workflows. These are based on the workflows found in the [Flutter Gallery](https://github.com/flutter/gallery) repository.
3+
This sample project allows you to leverage GitHub Actions to run common Flutter workflows. These are based on the workflows found in the [Flutter Gallery](https://github.com/flutter/gallery) repository. Continue reading to apply these to your Flutter project.
4+
5+
## Disclaimer
6+
This is still in active development, and it currently supports iOS and Android deployments only. Please open a pull request to support other platforms.
47

58
## Usage
69

7-
Create a workflow `.yml` file in your `.github/workflows` directory. Example workflows are available in this repository. For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).
10+
Create workflows in your `.github/workflows` directory. Examples are available in this repository. For more information, see the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).
811

9-
## Workflows
12+
*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 the [GitHub flow](https://guides.github.com/introduction/flow/) and [release based workflow](https://lab.github.com/githubtraining/create-a-release-based-workflow).
1013

11-
All workflows use the [Ensure SHA Pinned Actions](https://github.com/marketplace/actions/ensure-sha-pinned-actions) action to ensure security hardening.
14+
### Workflows
1215

13-
_Note:_ The [Get the Flutter Version Environment](https://github.com/marketplace/actions/get-the-flutter-version-environment) action requires that the [`pubspec.yaml`](pubspec.yaml) file contains an `environment:flutter:` key. This is used for installing Flutter in the workflows.
16+
- All of the workflows here use the [Ensure SHA Pinned Actions](https://github.com/marketplace/actions/ensure-sha-pinned-actions) action to ensure security hardening.
17+
- The [Get the Flutter Version Environment](https://github.com/marketplace/actions/get-the-flutter-version-environment) action requires that the [`pubspec.yaml`](pubspec.yaml) file contains an `environment:flutter:` key, which is used for installing Flutter with the correct version.
1418

15-
### Continuous Integration
19+
#### Continuous Integration
1620
[![CI](https://github.com/zgosalvez/github-actions-flutter-workflow/workflows/CI/badge.svg)](https://github.com/zgosalvez/github-actions-flutter-workflow/actions?query=workflow%3ACI)
1721

1822
[`.github/workflows/ci.yml`](workflows/ci.yml)
1923

20-
Also known as CI, Continuous Integration runs Flutter static and dynamic tests on every pull request to `main`, then the coverage report is stored as an artifact for reference. Modify the workflow to further process the code coverage file using [code quality](https://github.com/marketplace?type=actions) or [code review](https://github.com/marketplace?category=code-review&type=actions) actions.
24+
Also known as CI, Continuous Integration runs Flutter static and dynamic tests on *every pull request* to `main` and `release/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, https://github.com/zgosalvez/github-actions-flutter-workflows/pull/9#issuecomment-750863281. Modify the workflow to further process the code coverage file using [code quality](https://github.com/marketplace?type=actions) or [code review](https://github.com/marketplace?category=code-review&type=actions) actions.
2125

22-
### Continuous Delivery
26+
#### Continuous Delivery
2327
[![CDelivery](https://github.com/zgosalvez/github-actions-flutter-workflow/workflows/CDelivery/badge.svg)](https://github.com/zgosalvez/github-actions-flutter-workflow/actions?query=workflow%3ACDelivery)
2428

2529
[`.github/workflows/cdelivery.yml`](workflows/cdelivery.yml)
2630

27-
Also known as CDelivery (not to be mistaken with another CD, Continuous Deployment), Continuous Delivery reruns the same Flutter static and dynamic tests from the CI on every push to `main`, then a pre-release draft is created. Manually, remove the pre-release mark after it has been deployed and released to the app store.
31+
Also known as CDelivery (not to be mistaken with another CD, i.e., Continuous Deployment), Continuous Delivery reruns the same Flutter static and dynamic tests from the CI on *every push* to `main` and `release/v*`, then a pre-release draft is created or updated. This ensures that the protected branches are bug-free and drafted release is updated. Manually remove the pre-release mark after it has been deployed and released to the app store.
32+
33+
*Note:* Since CDelivery reruns the `testing` job from CI, it will cost you additional runner minutes. If you are conscious of your budget and [require branches to be up to date before merging](https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/enabling-required-status-checks#:~:text=Require%20branches%20to%20be%20up%20to%20date%20before%20merging), you should comment the job out.
2834

29-
### Deployment
35+
#### Deployment
3036
[![Deployment](https://github.com/zgosalvez/github-actions-flutter-workflow/workflows/Deployment/badge.svg)](https://github.com/zgosalvez/github-actions-flutter-workflow/actions?query=workflow%3ADeployment)
3137

3238
[`.github/workflows/deployment.yml`](workflows/deployment.yml)
3339

34-
Deployment is triggered when the release draft 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.
40+
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.
3541

3642
## License
3743
The scripts and documentation in this project are released under the [MIT License](LICENSE)

.github/workflows/cdelivery.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: CDelivery
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- main
7+
- release/v*
68

79
jobs:
810
security_hardening:

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: CI
22

33
on:
44
pull_request:
5-
branches: [ main ]
5+
branches:
6+
- main
7+
- release/v*
68

79
jobs:
810
security_hardening:

0 commit comments

Comments
 (0)