From c8e60ca62bd96fa6954fd0be0eaec841bc5050cd Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Tue, 5 Nov 2024 14:56:50 +0100 Subject: [PATCH] fix: Don't tag release branch during dry-run --- .github/workflows/release.yml | 1 + ci/scripts/bump-and-tag.bash | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c497d3f5..1caf68fe4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,6 +59,7 @@ jobs: - name: Bump and tag project run: bash ci/scripts/bump-and-tag.bash env: + LIVE_RUN: ${{ inputs.live-run || false }} VERSION: ${{ steps.create-release-branch.outputs.version }} GIT_USER_NAME: eclipse-zenoh-bot GIT_USER_EMAIL: eclipse-zenoh-bot@users.noreply.github.com diff --git a/ci/scripts/bump-and-tag.bash b/ci/scripts/bump-and-tag.bash index 58883d627..f54d8953e 100644 --- a/ci/scripts/bump-and-tag.bash +++ b/ci/scripts/bump-and-tag.bash @@ -2,6 +2,7 @@ set -xeo pipefail +readonly live_run=${LIVE_RUN:-false} # Release number readonly version=${VERSION:-input VERSION is required} # Git actor name @@ -18,7 +19,9 @@ export GIT_COMMITTER_EMAIL=$git_user_email printf '%s' "$version" > version.txt git commit version.txt -m "chore: Bump version to $version" -git tag --force "$version" -m "v$version" +if [[ ${live_run} ]]; then + git tag --force "$version" -m "v$version" +fi git log -10 git show-ref --tags git push --force origin