Adding choice
This commit is contained in:
16
action.yml
16
action.yml
@@ -11,6 +11,15 @@ inputs:
|
|||||||
- "Major - Incompatible API changes"
|
- "Major - Incompatible API changes"
|
||||||
- "Minor - Adding functionality in a backward compatible manner"
|
- "Minor - Adding functionality in a backward compatible manner"
|
||||||
- "Patch - Backward compatible bug fixes"
|
- "Patch - Backward compatible bug fixes"
|
||||||
|
new_branch_on:
|
||||||
|
type: choice
|
||||||
|
description: Makes a new branch on
|
||||||
|
options:
|
||||||
|
- "Major"
|
||||||
|
- "Minor"
|
||||||
|
- "Never"
|
||||||
|
required: false
|
||||||
|
default: "Major"
|
||||||
token:
|
token:
|
||||||
description: 'A Gitea PAT'
|
description: 'A Gitea PAT'
|
||||||
required: true
|
required: true
|
||||||
@@ -74,8 +83,11 @@ runs:
|
|||||||
git tag -a "v${NEW_VERSION}" -m "Release version ${NEW_VERSION}"
|
git tag -a "v${NEW_VERSION}" -m "Release version ${NEW_VERSION}"
|
||||||
git push origin "v${NEW_VERSION}"
|
git push origin "v${NEW_VERSION}"
|
||||||
|
|
||||||
if [[ "${{ inputs.semver }}" == "Major"* ]]; then
|
if { [[ "${{ inputs.new_branch_on }}" == "Major"* ]] &&
|
||||||
log_info "Major version, creating release branch for backports"
|
{ [[ "${{ inputs.semver }}" == "Major"* ]] || [[ "${{ inputs.semver }}" == "Minor"* ]]; }; } ||
|
||||||
|
{ [[ "${{ inputs.new_branch_on }}" == "Minor"* ]] && [[ "${{ inputs.semver }}" == "Minor"* ]]; }; then
|
||||||
|
|
||||||
|
log_info "${{ inputs.new_branch_on }} version, creating release branch for backports"
|
||||||
git branch "release/v${NEW_VERSION}"
|
git branch "release/v${NEW_VERSION}"
|
||||||
git push origin "release/v${NEW_VERSION}"
|
git push origin "release/v${NEW_VERSION}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user