From 705bfba6ed0c89f08e17b361509c066803fc1453 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Thu, 14 Nov 2024 12:06:59 +0100 Subject: [PATCH] fix: Don't tag release branch during dry-run Aligning with [ci repository](https://github.com/eclipse-zenoh/ci/pull/239) to not tag the repo when we are running release 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 b8d09014a..cb57c91da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,6 +60,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 }} BUMP_DEPS_VERSION: ${{ inputs.zenoh-version }} BUMP_DEPS_PATTERN: ${{ inputs.zenoh-version && 'zenoh.*' || '' }} diff --git a/ci/scripts/bump-and-tag.bash b/ci/scripts/bump-and-tag.bash index f39f9bffe..5b5f7ee4c 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} # Dependencies' pattern @@ -59,7 +60,9 @@ if [[ "$bump_deps_pattern" != '' ]]; then fi fi -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 origin