From 1bcd3e4f3335dddec7afb5e073660a94a06a5105 Mon Sep 17 00:00:00 2001 From: Swanny Date: Mon, 4 Nov 2024 12:46:23 -0500 Subject: [PATCH] fix: new git command for tags thats more better --- .github/workflows/autorelease.yml | 3 +-- Cargo.toml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autorelease.yml b/.github/workflows/autorelease.yml index ad28d6c..bd9f396 100644 --- a/.github/workflows/autorelease.yml +++ b/.github/workflows/autorelease.yml @@ -19,7 +19,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: "ref/heads/main" fetch-tags: "true" fetch-depth: "0" - name: Verify new release needed @@ -29,7 +28,7 @@ jobs: CARGO_VER="v$(cargo metadata --format-version=1 --no-deps | jq '.packages[] | select(.name == "zenith-builder-example") | .version' -r)" echo "$CARGO_VER" # get latest version from git tags - GIT_VER=$(git describe --tags --abbrev=0) + GIT_VER=$(git describe --tags $(git rev-list --tags --max-count=1)) echo "$GIT_VER" if [ "$CARGO_VER" == "$GIT_VER" ]; then echo "# No new release needed" >> $GITHUB_STEP_SUMMARY diff --git a/Cargo.toml b/Cargo.toml index 913b3f1..3e5276c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,3 +47,4 @@ tracing-subscriber = "0.3.18" async-trait = "0.1.80" oauth2 = "4.4.2" +