From ded5295199044a72d0b652d57925885be39b36ae Mon Sep 17 00:00:00 2001 From: Guillaume Gayot Date: Wed, 30 Oct 2024 18:23:04 +0100 Subject: [PATCH] feat(profile): add bump profile input --- action.yml | 9 ++++++++- cog.sh | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index eda8275..972933a 100644 --- a/action.yml +++ b/action.yml @@ -37,6 +37,10 @@ inputs: commit specification but do not create any commit. required: false default: 'false' + profile: + description: 'Specify bump profile' + required: false + default: null outputs: version: @@ -70,4 +74,7 @@ runs: ${{ inputs.release }} \ ${{ inputs.git-user }} \ ${{ inputs.git-user-email }} \ - ${{ inputs.verify }} + ${{ inputs.verify }} \ + ${{ inputs.profile }} + + diff --git a/cog.sh b/cog.sh index add915f..4317449 100755 --- a/cog.sh +++ b/cog.sh @@ -32,8 +32,12 @@ if [ "${CHECK}" = "true" ]; then fi fi -if [ "${RELEASE}" = "true" ]; then - cog bump --auto || exit 1 +if [ "$RELEASE" = "true" ]; then + if [ "$PROFILE" != null ]; then + cog bump --auto -h $PROFILE || exit 1 + else + cog bump --auto || exit 1 + fi VERSION="$(git describe --tags "$(git rev-list --tags --max-count=1)")" echo "version=$VERSION" >> $GITHUB_OUTPUT fi