generated from cloudposse/example-github-action-composite
/
README.yaml
108 lines (86 loc) · 3.86 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
name: Release Branch Manager
tags:
- github-action
license: "APACHE2"
github_repo: cloudposse/github-action-release-branch-manager
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/github-action-release-branch-manager.svg"
url: "https://github.com/cloudposse/github-action-release-branch-manager/releases/latest"
- name: "Slack Community"
image: "https://slack.cloudposse.com/badge.svg"
url: "https://slack.cloudposse.com"
related:
- name: "Major Release Tagger GitHub Action"
description: 'GitHub Action that automatically generates or updates `v<major-release>` tags every time a new release is published.'
url: "https://github.com/cloudposse/github-action-major-release-tagger"
- name: "Release Label Validator GitHub Action"
description: 'Verifies labels that are set on Pull Request'
url: "https://github.com/cloudposse/github-action-release-label-validator"
description: GitHub Action for Managing Release Branches
introduction: |-
This GitHub Action adopts a streamlined approach to managing release branches, drawing on a trunk-based branching strategy. In this model, the `DEFAULT_BRANCH` consistently represents the most recent release, while release branches are exclusively created for previous major releases, if applicable. This structure simplifies the process for contributors when submitting Pull Requests for bug fixes or backporting modifications to older releases, as it enables them to target a specific major release.
**How it works:** upon publishing a new major release `N`, a corresponding branch for the previous release `N-1` will be automatically generated.
Imagine you have tags like this in your repo:
```
0.1.0
0.2.0
1.0.0
1.1.0
1.2.0
1.2.1
2.0.0
2.1.0
2.2.0
3.0.0
3.1.0 main
```
Upon the first release published event, the "release branch manager" will generate new branches named `release/vN-1`, where N corresponds to the latest tag of each major release. In this case, several new branches will be created:
```
0.1.0
0.2.0 release/v0
1.0.0
1.1.0
1.2.0
1.2.1 release/v1
2.0.0
2.1.0
2.2.0 release/v2
3.0.0
3.1.0 main
```
Note that `3.1.0` is latest tag and release branch manager wouldn't create release branch because latest major release is maintained in `main` branch.
If you wish to make changes to `2.2.0`, you must create a pull request for the `release/v2` branch and generate a corresponding release/tag with a major version of `2`, for example, `2.3.0`.
This action requires GitHub releases to follow the [SemVer versioning](https://semver.org/) scheme.
usage: |-
Example of workflow that that will create major release tags. To use it, just add this workflow to your `.github/workflows` directory.
```yaml
name: Manager Release Branch
on:
release:
types:
- published
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: cloudposse/github-action-release-branch-manager@v1
```
references:
- name: "Release Drafter GitHub Action"
description: 'Drafts your next release notes as pull requests are merged into your default branch.'
url: "https://github.com/release-drafter/release-drafter"
- name: "Release Branch Manager GitHub Action"
description: 'Automatically creates "Long Term Support (LTS)" release branches when new releases are published'
url: "https://github.com/cloudposse/github-action-release-branch-manager"
- name: "Major Release Tagger GitHub Action"
description: 'GitHub Action that automatically generates or updates `v<major-release>` tags every time a new release is published.'
url: "https://github.com/cloudposse/github-action-major-release-tagger"
include:
- "docs/github-action.md"
contributors:
- name: "Zinovii Dmytriv"
github: "zdmytriv"
- name: "Erik Osterman"
github: "osterman"