Skip to content

Commit 656dede

Browse files
committed
refactor: Do not apply 1:1 release please config, but stress on important decisions
1 parent 791ea99 commit 656dede

File tree

1 file changed

+30
-170
lines changed

1 file changed

+30
-170
lines changed

docs/Release-Workflow.md

Lines changed: 30 additions & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -43,140 +43,58 @@ The workflow consists of three main jobs:
4343

4444
## Release Please Configuration
4545

46-
The configuration is defined in [`release-please-config.json`](../release-please-config.json). Below is a detailed explanation of each property:
46+
The configuration is defined in [`release-please-config.json`](../release-please-config.json). This section explains our specific configuration choices and constraints.
4747

48+
### Key Configuration Decisions
4849

49-
### `group-pull-request-title-pattern`
50+
#### PR Title Pattern
5051

5152
```json
5253
"group-pull-request-title-pattern": "release: UI5 CLI packages ${branch}"
5354
```
5455

55-
**Purpose**: Defines the title format for release pull requests in monorepos
56+
**Why we can't use `${version}`**: When using the `linked-versions` plugin, Release Please doesn't support the `${version}` placeholder in the PR title pattern. This is because linked versions create a single PR for multiple packages with the same version, but the templating system doesn't expose this shared version to the title pattern. As a workaround, we use `${branch}` (which resolves to "main") instead.
5657

57-
**Behavior**:
58-
- Uses `${branch}` placeholder, which gets replaced with the branch name
59-
- For linked versions, Release Please creates a single PR for all packages
60-
61-
**Documentation**: [Grouping Pull Requests](https://github.com/googleapis/release-please?tab=readme-ov-file#group-pull-request-title-pattern)
58+
**Documentation**: [group-pull-request-title-pattern](https://github.com/googleapis/release-please?tab=readme-ov-file#group-pull-request-title-pattern)
6259

6360
---
6461

65-
### `release-type`
66-
67-
```json
68-
"release-type": "node"
69-
```
70-
71-
**Purpose**: Specifies the project type, which determines the default behavior for versioning and changelog generation
72-
73-
**Behavior**:
74-
- Uses Node.js/npm conventions
75-
- Updates `package.json` version field
76-
- Generates conventional changelog format
77-
- Handles npm-specific files
78-
79-
**Documentation**: [Release Types](https://github.com/googleapis/release-please?tab=readme-ov-file#release-types-supported)
80-
81-
---
82-
83-
### `always-update`
84-
85-
```json
86-
"always-update": true
87-
```
88-
89-
**Purpose**: Ensures the release PR is updated with every commit to the main branch
90-
91-
**Behavior**:
92-
- Scans commits since last release
93-
- Updates PR description, version numbers, and changelogs
94-
- Prevents stale release PRs
95-
96-
**Documentation**: This is a standard boolean flag in Release Please for keeping PRs current.
97-
98-
---
99-
100-
### `pull-request-header`
101-
102-
```json
103-
"pull-request-header": ":tractor: New release prepared"
104-
```
105-
106-
**Purpose**: Customizes the header text in the release PR description
107-
108-
**Behavior**:
109-
- Appears at the top of the release PR body
110-
- Can include emojis and markdown
111-
- Provides context to reviewers
112-
113-
**Documentation**: [Pull Request Header](https://github.com/googleapis/release-please?tab=readme-ov-file#pull-request-header)
114-
115-
---
116-
117-
### Prerelease Configuration
62+
#### Prerelease Configuration
11863

11964
```json
12065
"prerelease": true,
12166
"prerelease-type": "alpha",
12267
"release-as": "5.0.0-alpha.0"
12368
```
12469

125-
**Purpose**: Configures prerelease versioning for alpha/beta releases
126-
127-
**`prerelease`**:
128-
- Enables prerelease mode
129-
- Affects version bumping logic
130-
- [Documentation](https://github.com/googleapis/release-please?tab=readme-ov-file#prerelease)
131-
132-
**`prerelease-type`**:
133-
- Defines the prerelease identifier (alpha, beta, rc, etc.)
134-
- Appended to version designation: `5.0.0-alpha.0`, `5.0.0-alpha.1`, etc.
135-
- [Documentation](https://github.com/googleapis/release-please?tab=readme-ov-file#prerelease-type)
136-
137-
**`release-as`**:
138-
- Forces the next release version
139-
- Used for major version bumps or initial releases
140-
- Takes precedence over conventional commit version bumps
141-
- [Documentation](https://github.com/googleapis/release-please?tab=readme-ov-file#release-as)
70+
**Purpose**: We're currently in alpha phase for v5.0.0. Once stable, these flags should be removed to enable normal semantic versioning.
14271

14372
---
14473

145-
### `packages`
74+
#### Package Configuration
14675

14776
```json
14877
"packages": {
149-
"packages/logger": {
150-
"component": "logger"
151-
},
152-
"packages/cli": {
78+
"packages/logger": { "component": "logger" },
79+
"packages/cli": {
15380
"component": "cli",
15481
"extra-files": ["npm-shrinkwrap.json"]
15582
}
15683
}
15784
```
15885

159-
**Purpose**: Defines which packages in the monorepo are managed by Release Please
160-
161-
**Structure**:
162-
- **Key**: Path to package directory (relative to repo root)
163-
- **`component`**: Name used in changelog and release notes. Avoid scopes (@ui5) as this might tag something wrongly on GitHub
164-
- **`extra-files`**: Additional files to version-bump (beyond `package.json`)
86+
**Why explicit package configuration**: We explicitly list packages rather than using `exclude-paths` to:
87+
1. Make it clear which packages are released
88+
2. Prevent accidental inclusion of internal tooling
89+
3. Keep the configuration maintainable
16590

166-
**Behavior**:
167-
- Each package gets its own changelog
168-
- Only specified packages are included in releases
91+
**Why `"component"` doesn't include `@ui5` scope**: Using scoped names (e.g., `"@ui5/logger"`) in the component field can cause incorrect GitHub tagging behavior.
16992

170-
**Documentation**: [Monorepo Support](https://github.com/googleapis/release-please?tab=readme-ov-file#monorepo-support)
171-
172-
**Note**: We explicitly configure packages instead of using `exclude-paths` for the following reasons:
173-
1. More maintainable - clear list of released packages
174-
2. Prevents accidental inclusion of internal tooling
175-
3. Better for documentation and understanding
93+
**Why `extra-files` for CLI**: The CLI package's `npm-shrinkwrap.json` must be version-bumped alongside `package.json` to maintain consistency.
17694

17795
---
17896

179-
### Plugins
97+
#### Plugin Configuration
18098

18199
```json
182100
"plugins": [
@@ -192,95 +110,37 @@ The configuration is defined in [`release-please-config.json`](../release-please
192110
]
193111
```
194112

195-
**Purpose**: Extends Release Please functionality with additional behaviors
196-
197-
#### `node-workspace` Plugin
113+
**`node-workspace` with `merge: false`**: When using `linked-versions`, the `node-workspace` plugin **must** set `merge: false` ([documented requirement](https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md#linked-versions)). This prevents conflicts in Release Please's internal manifest processing between:
114+
1. The `linked-versions` plugin synchronizing versions across all packages
115+
2. The `node-workspace` plugin updating workspace dependency references
198116

199-
```json
200-
{
201-
"type": "node-workspace",
202-
"merge": false
203-
}
204-
```
117+
Without this flag, Release Please may fail to generate the release PR or produce incorrect version updates.
205118

206-
**Purpose**: Automatically updates workspace dependency versions in `package.json` files
119+
**Note**: Release Please always force-pushes to the PR branch, so this flag only affects internal manifest processing, not Git commit structure.
207120

208-
**Behavior**:
209-
- Scans all `package.json` files in the workspace
210-
- Updates `dependencies` and `devDependencies` when workspace packages are bumped
211-
- `merge: false` updates versions, but doesn't merge PRs automatically
121+
**`linked-versions` rationale**: All UI5 CLI packages are tightly coupled and should be released together with synchronized version numbers.
212122

213123
**Known limitations**:
214124
- Cannot resolve circular peer dependencies (e.g., `@ui5/project``@ui5/builder`)
215125
- May update lockfile entries for npm aliases incorrectly
216126

217127
**Workaround**: We manually update circular peer dependencies in the workflow after Release Please runs.
218128

219-
**Documentation**: [Node Workspace Plugin](https://github.com/googleapis/release-please/blob/main/docs/plugins.md#node-workspace)
220-
221-
---
222-
223-
#### `linked-versions` Plugin
224-
225-
```json
226-
{
227-
"type": "linked-versions",
228-
"groupName": "ui5-cli-packages",
229-
"components": ["logger", "fs", "builder", "server", "project", "cli"]
230-
}
231-
```
232-
233-
**Purpose**: Synchronizes version numbers across multiple packages in a monorepo
234-
235-
**Behavior**:
236-
- All specified components get the same version number
237-
- Single release PR created for all packages
238-
- Single GitHub release created for the group
239-
- Changelogs are still separate per package
240-
241-
**Benefits**:
242-
- Simplifies versioning for tightly coupled packages
243-
- Easier for consumers to know compatible versions
244-
- Reduces release management overhead
245-
246-
**Documentation**: [Linked Versions Plugin](https://github.com/googleapis/release-please/blob/main/docs/plugins.md#linked-versions)
247-
248129
---
249130

250-
### `changelog-sections`
131+
#### Changelog Sections
251132

252133
```json
253134
"changelog-sections": [
254-
{
255-
"type": "feat",
256-
"section": "Features"
257-
},
258-
{
259-
"type": "fix",
260-
"section": "Bug Fixes"
261-
},
262-
{
263-
"type": "docs",
264-
"section": "Documentation",
265-
"hidden": true
266-
}
135+
{ "type": "feat", "section": "Features" },
136+
{ "type": "fix", "section": "Bug Fixes" },
137+
{ "type": "docs", "section": "Documentation", "hidden": true }
267138
]
268139
```
269140

270-
**Purpose**: Defines which commit types appear in the changelog and how they're grouped
271-
272-
**Structure**:
273-
- **`type`**: Conventional commit type (feat, fix, docs, etc.)
274-
- **`section`**: Heading in the changelog
275-
- **`hidden`**: If `true`, commits won't appear in changelog but may still trigger version bumps
141+
**Visible in changelogs**: Features, bug fixes, performance improvements, dependencies, reverts
276142

277-
**Behavior**:
278-
- Only configured types are included
279-
- Types can be reordered by array position
280-
- Hidden types are useful for internal changes (tests, CI, etc.)
143+
**Hidden but tracked**: Documentation, styles, refactoring, tests, build, CI, release
281144

282-
**Documentation**: [Changelog Sections](https://github.com/googleapis/release-please?tab=readme-ov-file#changelog-sections)
145+
**Rationale**: Internal changes don't need to appear in user-facing changelogs, but should still be tracked in commit history.
283146

284-
**Our Configuration**:
285-
- **Visible**: Features, bugfixes, performance improvements, dependencies, reverts
286-
- **Hidden**: Documentation, styles, refactoring, tests, build, CI, release

0 commit comments

Comments
 (0)