From 06bbb8eb3a851dc3aac0245b353f2fb5b3ef1577 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 30 Sep 2024 15:44:47 -0400 Subject: [PATCH] feat: update release workflow to use latest tag --- .github/workflows/scheduled-release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/scheduled-release.yml b/.github/workflows/scheduled-release.yml index f60421677..be09a4fae 100644 --- a/.github/workflows/scheduled-release.yml +++ b/.github/workflows/scheduled-release.yml @@ -18,7 +18,19 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: + repository: onsonr/sonr fetch-depth: 0 + fetch-tags: true + + - name: Get latest tag + run: | + # Fetch all tags + git fetch --tags + # Get the latest tag + LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) + echo "Latest Tag: $LATEST_TAG" + # Checkout the latest tag + git checkout $LATEST_TAG - uses: actions/setup-go@v5 with: