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