Skip to content

Commit 435e216

Browse files
authored
feat: add bump-patch-for-minor-pre-major option (#365)
1 parent 973b63d commit 435e216

6 files changed

Lines changed: 30 additions & 22 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Automate releases with Conventional Commit Messages.
5050
| `release-type` | What type of project is this a release for? Reference [Release types supported](#release-types-supported); new types of releases can be [added here](https://github.com/googleapis/release-please/tree/master/src/releasers) |
5151
| `package-name` | A name for the artifact releases are being created for (this might be the `name` field in a `setup.py` or `package.json`) |
5252
| `bump-minor-pre-major` | Should breaking changes before 1.0.0 produce minor bumps? Default `No` |
53+
| `bump-patch-for-minor-pre-major` | Should feat changes before 1.0.0 produce patch bumps instead of minor bumps? Default `No` |
5354
| `path` | create a release from a path other than the repository's root |
5455
| `monorepo-tags` | add prefix to tags and branches, allowing multiple libraries to be released from the same repository. |
5556
| `changelog-types` | A JSON formatted String containing to override the outputted changelog sections |

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ inputs:
2424
description: 'should breaking changes before 1.0.0 produce minor bumps'
2525
required: false
2626
default: false
27+
bump-patch-for-minor-pre-major:
28+
description: 'should feat changes before 1.0.0 produce patch bumps instead of minor bumps'
29+
required: false
30+
default: false
2731
path:
2832
description: "create a release from a path other than the repository's root"
2933
required: false

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ async function main () {
8080
const { token, fork, defaultBranch, apiUrl, repoUrl } = getGitHubInput()
8181

8282
const bumpMinorPreMajor = getBooleanInput('bump-minor-pre-major')
83+
const bumpPatchForMinorPreMajor = getBooleanInput('bump-patch-for-minor-pre-major')
8384
const monorepoTags = getBooleanInput('monorepo-tags')
8485
const packageName = core.getInput('package-name')
8586
const path = core.getInput('path') || undefined
@@ -128,6 +129,7 @@ async function main () {
128129
token,
129130
label: RELEASE_LABEL,
130131
bumpMinorPreMajor,
132+
bumpPatchForMinorPreMajor,
131133
changelogPath,
132134
changelogSections,
133135
versionFile,

package-lock.json

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"homepage": "https://github.com/bcoe/release-please-action#readme",
2727
"dependencies": {
2828
"@actions/core": "^1.2.6",
29-
"release-please": "^11.23.0"
29+
"release-please": "^11.24.2"
3030
},
3131
"devDependencies": {
3232
"@vercel/ncc": "^0.27.0",

test/release-please.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const defaultInput = {
1111
fork: 'false',
1212
clean: 'true',
1313
'bump-minor-pre-major': 'false',
14+
'bump-patch-for-minor-pre-major': 'false',
1415
path: '',
1516
'monorepo-tags': 'false',
1617
'changelog-path': '',

0 commit comments

Comments
 (0)