diff --git a/action.yml b/action.yml index 64fdfad..bb906ea 100644 --- a/action.yml +++ b/action.yml @@ -36,6 +36,10 @@ inputs: description: "" default: "true" + tag_semver_enable: + description: "set to false to disable semver tagging completely" + default: "true" + tag_semver_major: description: "" default: "true" diff --git a/dist/index.js b/dist/index.js index be33bb8..439fbd9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -62205,17 +62205,19 @@ function collectTags(information) { let tagCommitPrefix = (core.getInput('tag_commit_prefix') ?? '').trim(); // handle semver - if (core.getBooleanInput('tag_semver_major') && isNonEmptyStr(information.semver_major)) { - tags.push(tagPrefix + information.semver_major); - foundSemverTag = true; - } - if (core.getBooleanInput('tag_semver_minor') && isNonEmptyStr(information.semver_minor)) { - tags.push(tagPrefix + information.semver_minor); - foundSemverTag = true; - } - if (core.getBooleanInput('tag_semver_patch') && isNonEmptyStr(information.semver_patch)) { - tags.push(tagPrefix + information.semver_patch); - foundSemverTag = true; + if (core.getBooleanInput('tag_semver_enable')) { + if (core.getBooleanInput('tag_semver_major') && isNonEmptyStr(information.semver_major)) { + tags.push(tagPrefix + information.semver_major); + foundSemverTag = true; + } + if (core.getBooleanInput('tag_semver_minor') && isNonEmptyStr(information.semver_minor)) { + tags.push(tagPrefix + information.semver_minor); + foundSemverTag = true; + } + if (core.getBooleanInput('tag_semver_patch') && isNonEmptyStr(information.semver_patch)) { + tags.push(tagPrefix + information.semver_patch); + foundSemverTag = true; + } } // handle git tag/branch diff --git a/src/lib.js b/src/lib.js index c06d23c..32c0944 100644 --- a/src/lib.js +++ b/src/lib.js @@ -101,17 +101,19 @@ export function collectTags(information) { let tagCommitPrefix = (core.getInput('tag_commit_prefix') ?? '').trim(); // handle semver - if (core.getBooleanInput('tag_semver_major') && isNonEmptyStr(information.semver_major)) { - tags.push(tagPrefix + information.semver_major); - foundSemverTag = true; - } - if (core.getBooleanInput('tag_semver_minor') && isNonEmptyStr(information.semver_minor)) { - tags.push(tagPrefix + information.semver_minor); - foundSemverTag = true; - } - if (core.getBooleanInput('tag_semver_patch') && isNonEmptyStr(information.semver_patch)) { - tags.push(tagPrefix + information.semver_patch); - foundSemverTag = true; + if (core.getBooleanInput('tag_semver_enable')) { + if (core.getBooleanInput('tag_semver_major') && isNonEmptyStr(information.semver_major)) { + tags.push(tagPrefix + information.semver_major); + foundSemverTag = true; + } + if (core.getBooleanInput('tag_semver_minor') && isNonEmptyStr(information.semver_minor)) { + tags.push(tagPrefix + information.semver_minor); + foundSemverTag = true; + } + if (core.getBooleanInput('tag_semver_patch') && isNonEmptyStr(information.semver_patch)) { + tags.push(tagPrefix + information.semver_patch); + foundSemverTag = true; + } } // handle git tag/branch