From cc4c986d51c307ef3f5ce506688c5808069e7d7c Mon Sep 17 00:00:00 2001 From: Calum Calder Date: Mon, 17 Feb 2025 15:00:42 +0000 Subject: [PATCH] ci: improve tag pipelines Co-authored-by: Jonathan Zacsh --- .github/workflows/release.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3bad010b..4f1779d16 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,15 +24,17 @@ jobs: fetch-depth: 0 # Fetch tags, which are required to calculate the new version token: "${{ secrets.GITHUB_TOKEN }}" - name: "Install commitizen" - run: pip install --user -U commitizen + run: | + pip install --user -U commitizen && + cz version --verbose - id: tag - name: "Tag release" + name: "Release: Publish new semver Git Tag" run: | - VERSION=$(cz bump --get-next) - TAG="v${VERSION}" - git tag "${TAG}" - git push origin "${TAG}" --tags - echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + NEW_VERSION=$(cz bump --get-next) || exit 1 + TAG="v${NEW_VERSION}" + git tag "${TAG}" && + git push origin "${TAG}" --tags && + echo "version=${VERSION}" | tee "$GITHUB_OUTPUT" release: needs: bump_version runs-on: ubuntu-latest