Skip to content

Commit 17fb3a5

Browse files
authored
chore: automate releases (#319)
1 parent 70a1f0c commit 17fb3a5

File tree

21 files changed

+373
-191
lines changed

21 files changed

+373
-191
lines changed

.github/.cspell/words_dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Actual english words (or common abbreviations) missing from CSpell:
2+
brickhub # BrickHub is a platform where developers can discover, install, and publish reusable templates called bricks
23
CLI # Abbreviation for Command Line Interface.
34
CLIs # Plural of the abbreviation for Command Line Interface.
45
CLI's # Belonging to a CLI.

.github/workflows/release_please.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: release_please
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- 'very_good_core/**'
14+
- 'very_good_dart_cli/**'
15+
- 'very_good_dart_package/**'
16+
- 'very_good_flutter_plugin/**'
17+
- 'very_good_flutter_package/**'
18+
- 'very_good_docs_site/**'
19+
- 'very_good_flame_game/**'
20+
- 'very_good_wear_app/**'
21+
22+
jobs:
23+
create_release_pr:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: googleapis/release-please-action@v4
28+
id: release-please
29+
with:
30+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
31+
manifest-file: ".release-please-manifest.json"
32+
config-file: ".release-please-config.json"

.release-please-config.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"changelog-sections": [
4+
{ "type": "feat", "section": "Features" },
5+
{ "type": "fix", "section": "Bug Fixes" },
6+
{ "type": "refactor","section": "Refactors" },
7+
{ "type": "chore", "section": "Miscellaneous Chores" },
8+
{ "type": "docs", "section": "Docs" }
9+
],
10+
"pull-request-header": ":rotating_light: There are changes ready for release :rocket:\n\nℹ Merge this PR once the team confirms the release is ready.\n",
11+
"pull-request-title-pattern": "chore(${component}): ${version}",
12+
"separate-pull-requests": true,
13+
"component-no-space": true,
14+
"packages": {
15+
"very_good_core": {
16+
"release-type": "simple",
17+
"version-file": "version.txt",
18+
"component": "very_good_core",
19+
"extra-files": [
20+
"brick.yaml"
21+
]
22+
},
23+
"very_good_dart_cli": {
24+
"release-type": "simple",
25+
"version-file": "version.txt",
26+
"component": "very_good_dart_cli",
27+
"extra-files": [
28+
"brick.yaml"
29+
]
30+
},
31+
"very_good_dart_package": {
32+
"release-type": "simple",
33+
"version-file": "version.txt",
34+
"component": "very_good_dart_package",
35+
"extra-files": [
36+
"brick.yaml"
37+
]
38+
},
39+
"very_good_docs_site": {
40+
"release-type": "simple",
41+
"version-file": "version.txt",
42+
"component": "very_good_docs_site",
43+
"extra-files": [
44+
"brick.yaml"
45+
]
46+
},
47+
"very_good_flame_game": {
48+
"release-type": "simple",
49+
"version-file": "version.txt",
50+
"component": "very_good_flame_game",
51+
"extra-files": [
52+
"brick.yaml"
53+
]
54+
},
55+
"very_good_flutter_package": {
56+
"release-type": "simple",
57+
"version-file": "version.txt",
58+
"component": "very_good_flutter_package",
59+
"extra-files": [
60+
"brick.yaml"
61+
]
62+
},
63+
"very_good_flutter_plugin": {
64+
"release-type": "simple",
65+
"version-file": "version.txt",
66+
"component": "very_good_flutter_plugin",
67+
"extra-files": [
68+
"brick.yaml"
69+
]
70+
},
71+
"very_good_wear_app": {
72+
"release-type": "simple",
73+
"version-file": "version.txt",
74+
"component": "very_good_wear_app",
75+
"extra-files": [
76+
"brick.yaml"
77+
]
78+
}
79+
}
80+
}

.release-please-manifest.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"very_good_core": "1.0.0",
3+
"very_good_dart_cli": "1.0.0",
4+
"very_good_dart_package": "1.0.0",
5+
"very_good_docs_site": "1.0.0",
6+
"very_good_flame_game": "1.0.0",
7+
"very_good_flutter_package": "1.0.0",
8+
"very_good_flutter_plugin": "1.0.0",
9+
"very_good_wear_app": "1.0.0"
10+
}
11+

CONTRIBUTING.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
### Release Process 🚀
2+
3+
We use [`release-please-action`][release-please-action-link] to automate versioning and changelog generation, along with a GitHub workflow that automatically publish the templates to [brickhub.dev][brickhub_link].
4+
5+
### How it works:
6+
7+
- 📌 **On Every Commit to main:**
8+
- Commits are analyzed using [Conventional Commits][conventional_commits_link].
9+
- If a version bump is needed, a **release PR** is automatically created or updated by [`release-please-action`][release-please-action-link].
10+
- The **release PR** includes:
11+
- An updated `CHANGELOG.md`
12+
- A version bump in `brick.yaml`
13+
14+
##### 💡 Notes
15+
16+
- Release PR's are created **per template**.
17+
- The GitHub Action workflow that automates the release process is configured in `.github/workflows/release_please.yaml`
18+
- release-please settings are defined in `.release-please-config.json` and `.release-please-manifest.json`
19+
- The release PR can be manually edited before merging.
20+
- The release PR should be merged **ONLY** when a new release is needed.
21+
22+
<br />
23+
24+
-**When the Release PR Is Merged:**
25+
- A new Git tag is created.
26+
- A GitHub Release is published with the changelog.
27+
- A new version of the brick is automatically published in [brickhub.dev][brickhub_link].
28+
29+
#### 💡 Notes
30+
31+
- GitHub Releases are created **per template**.
32+
- The publishing process is automatically triggered when a version tag is created.
33+
- The automated publishing workflows to [brickhub.dev][brickhub_link] are defined in `.github/workflows/publish_<template-name>.yaml`
34+
35+
<br />
36+
37+
This document provides a good summary of how it works and how we use it, but we recommend that you also read the official documentation of [Conventional Commits][conventional_commits_link], [Semantic Versioning][sem_ver_link], [Publishing a Brick][brickhub_publishing_link] and [`release-please-action`][release-please-action-link].
38+
39+
[brickhub_link]: https://brickhub.dev/
40+
[brickhub_publishing_link]: https://docs.brickhub.dev/mason-publish
41+
[sem_ver_link]: https://semver.org/
42+
[release-please-action-link]: https://github.com/googleapis/release-please-action
43+
[conventional_commits_link]: https://www.conventionalcommits.org/en/v1.0.0

very_good_core/CHANGELOG.md

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# 1.0.0
1+
2+
## 1.0.0
23

34
refactor(very_good_core)!: remove root-level project_name folder from brick structure.
45

5-
## Migration details
6+
### Migration details
67

78
The `very_good_core` brick no longer includes a top-level project name folder.
89
This allows generating the project directly into the current or a custom directory.
@@ -17,14 +18,14 @@ mason make very_good_core
1718
mason make very_good_core -o ./output_folder
1819
```
1920

20-
# 0.11.1
21+
## 0.11.1
2122

2223
- docs: update test command in very good core README ([#287](https://github.com/VeryGoodOpenSource/very_good_templates/pull/287))
2324
- chore(very_good_core): deprecated script-based application of the flutter gradle plugin ([#249](https://github.com/VeryGoodOpenSource/very_good_templates/pull/249))
2425
- chore(very_good_core): update format on MainActivity.kt ([#290](https://github.com/VeryGoodOpenSource/very_good_templates/pull/290))
2526
- fix(android): correct source sets to ensure plugin compatibility ([#292](https://github.com/VeryGoodOpenSource/very_good_templates/pull/292))
2627

27-
# 0.11.0
28+
## 0.11.0
2829

2930
- chore(deps): bump very_good_analysis from 6.0.0 to 7.0.0 in /very_good_core/hooks [#233](https://github.com/VeryGoodOpenSource/very_good_templates/pull/233)
3031
- chore: tighten template dependencies [#237](https://github.com/VeryGoodOpenSource/very_good_templates/pull/237)
@@ -36,63 +37,63 @@ mason make very_good_core -o ./output_folder
3637
- fix(very_good_core): Update concurrency group name template [#255](https://github.com/VeryGoodOpenSource/very_good_templates/pull/255)
3738
- chore: bump very_good_analysis to 9.0.0 [#261](https://github.com/VeryGoodOpenSource/very_good_templates/pull/261)
3839

39-
# 0.10.0
40+
## 0.10.0
4041

4142
- feat: update pull request templates to add `test` type option ([#214](https://github.com/VeryGoodOpenSource/very_good_templates/pull/214))
4243
- chore: update to Flutter 3.27 and Dart 3.6 ([#223](https://github.com/VeryGoodOpenSource/very_good_templates/pull/223))
4344

44-
# 0.9.0
45+
## 0.9.0
4546

4647
- chore: update copyright year in Windows Runner.rc ([#188](https://github.com/VeryGoodOpenSource/very_good_templates/pull/188))
4748
- refactor: move current_year out from configuration ([#193](https://github.com/VeryGoodOpenSource/very_good_templates/pull/193))
4849
- fix: update android build versions ([#205](https://github.com/VeryGoodOpenSource/very_good_templates/pull/205))
4950

50-
# 0.8.0
51+
## 0.8.0
5152

5253
- feat: update to Flutter 3.24 and Dart 3.5 ([#177](https://github.com/VeryGoodOpenSource/very_good_templates/pull/177))
5354

54-
# 0.7.2
55+
## 0.7.2
5556

5657
- fix: update application identifier usage ([#148](https://github.com/VeryGoodOpenSource/very_good_templates/pull/148))
5758
- feat: use application id on macOS project ([#159](https://github.com/VeryGoodOpenSource/very_good_templates/pull/159))
5859
- fix: default id when application id is empty ([#165](https://github.com/VeryGoodOpenSource/very_good_templates/pull/165))
5960

60-
# 0.7.1
61+
## 0.7.1
6162

6263
- style: Adding extra space to the application opening tag ([#126](https://github.com/VeryGoodOpenSource/very_good_templates/pull/126))
6364
- chore: update Java versions on Very Good Core ([#128](https://github.com/VeryGoodOpenSource/very_good_templates/pull/128))
6465
- chore: update to Very Good Analysis 6.0.0 ([#135](https://github.com/VeryGoodOpenSource/very_good_templates/pull/135))
6566
- chore: tighten template dependencies ([#137](https://github.com/VeryGoodOpenSource/very_good_templates/pull/137))
6667

67-
# 0.7.0
68+
## 0.7.0
6869

6970
- feat!: ensure template uses Flutter 3.22 with Dart 3.4 ([#97](https://github.com/VeryGoodOpenSource/very_good_templates/pull/97))
7071
- fix: update index.html to support latest convention ([#106](https://github.com/VeryGoodOpenSource/very_good_templates/pull/106))
7172

72-
# 0.6.1
73+
## 0.6.1
7374

7475
- fix: deprecated imperative apply of Flutter's Gradle plugins ([#70](https://github.com/VeryGoodOpenSource/very_good_templates/pull/70))
7576

76-
# 0.6.0
77+
## 0.6.0
7778

7879
- chore: migrate very_good_core ([#1](https://github.com/VeryGoodOpenSource/very_good_templates/pull/1))
7980
- feat!: update to Flutter 3.19.0 ([#24](https://github.com/VeryGoodOpenSource/very_good_templates/pull/24))
8081
- chore: update bricks to Mason 0.1.0-dev.52 ([#28](https://github.com/VeryGoodOpenSource/very_good_templates/pull/28))
8182

82-
# 0.5.1
83+
## 0.5.1
8384

8485
- feat: minify icon pngs ([#317](https://github.com/VeryGoodOpenSource/very_good_core/pull/317))
8586
- fix: templated project name for Release-production flavor ([#319](https://github.com/VeryGoodOpenSource/very_good_core/pull/319))
8687

87-
# 0.5.0
88+
## 0.5.0
8889

8990
- feat: change launchMode on Android to singleTask ([#297](https://github.com/VeryGoodOpenSource/very_good_core/pull/297))
9091
- feat: add macOS platform support ([#299](https://github.com/VeryGoodOpenSource/very_good_core/pull/299))
9192
- refactor: remove generator script ([#306](https://github.com/VeryGoodOpenSource/very_good_core/pull/306))
9293
- docs: update semantic commit link ([#313](https://github.com/VeryGoodOpenSource/very_good_core/pull/313))
9394
- fix: regenerate ios directory ([#310](https://github.com/VeryGoodOpenSource/very_good_core/pull/310))
9495

95-
# 0.4.0
96+
## 0.4.0
9697

9798
- feat!: bump min Dart SDK to 3.1.0
9899
- feat!: update to Flutter 3.13.2
@@ -103,95 +104,95 @@ mason make very_good_core -o ./output_folder
103104
- fix: very_good create flutter_app doesn't create .gradlew files
104105
- feat: upgrade to `very_good_analysis ^5.1.0`
105106

106-
# 0.3.0
107+
## 0.3.0
107108

108109
- feat!: update to Flutter 3.10.0
109110
- fix: use valid app label
110111
- feat: update bloc
111112

112-
# 0.2.0
113+
## 0.2.0
113114

114115
- feat!: bump min Dart SDK to 2.19.0
115116

116-
# 0.1.15
117+
## 0.1.15
117118

118119
- chore: support dart sdk 2.18.0
119120
- fix: rollback very_good_analysis to 3.1.0
120121
- test: include e2e test
121122

122-
# 0.1.14
123+
## 0.1.14
123124

124125
- feat: update workflows and add spellcheck
125126
- chore: remove explicit Flutter version constraint
126127

127-
# 0.1.13
128+
## 0.1.13
128129

129130
- feat: upgrade to `very_good_analysis ^4.0.0`
130131

131-
# 0.1.12
132+
## 0.1.12
132133

133134
- feat: upgrade bloc
134135
- bloc ^8.1.1
135136
- flutter_bloc ^8.1.2
136137
- bloc_test ^9.1.1
137138
- feat: upgrade to Flutter 3.7.1
138139

139-
# 0.1.11
140+
## 0.1.11
140141

141142
- feat: upgrade to Flutter 3.7.0
142143

143-
# 0.1.10
144+
## 0.1.10
144145

145146
- fix: pre_gen.dart recase extension fix
146147

147-
# 0.1.9
148+
## 0.1.9
148149

149150
- feat: upgrade to Flutter 3.3.10
150151
- feat: upgrade to mason v0.1.0-dev.40
151152
- fix: use correct description in index.html
152153

153-
# 0.1.8
154+
## 0.1.8
154155

155156
- docs: remove copyright header and license from generated code
156157
- feat: use flavor app name for the bundle name
157158

158-
# 0.1.7
159+
## 0.1.7
159160

160161
- feat: upgrade to Flutter 3.3.8
161162
- feat: add optional `applicationId`
162163

163-
# 0.1.6
164+
## 0.1.6
164165

165166
- feat: upgrade to Flutter 3.3.7
166167

167-
# 0.1.5
168+
## 0.1.5
168169

169170
- feat: upgrade to Flutter 3.3.6
170171
- fix: add support for `GlobalCupertinoLocalizations`
171172

172-
# 0.1.4
173+
## 0.1.4
173174

174175
- feat: fix dependabot config file
175176

176-
# 0.1.3
177+
## 0.1.3
177178

178179
- feat: upgrade to Flutter 3.3.3
179180

180-
# 0.1.2
181+
## 0.1.2
181182

182183
- feat: upgrade to Flutter 3.3.2
183184
- feat: upgrade to very_good_analysis ^3.1.0
184185

185-
# 0.1.1
186+
## 0.1.1
186187

187188
- feat: upgrade to Flutter 3.3.1
188189
- feat: upgrade to very_good_analysis ^3.0.2
189190
- feat: add dependabot integration
190191

191-
# 0.1.0
192+
## 0.1.0
192193

193194
- feat: upgrade to Flutter 3.3 and Dart 2.18
194195

195-
# 0.0.1
196+
## 0.0.1
196197

197198
- feat: initial release 🎉

0 commit comments

Comments
 (0)