From 6bafd6eafe932d5b858d45784de42841dce36306 Mon Sep 17 00:00:00 2001 From: Pete Davids <5599894+MisterSquishy@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:21:48 -0500 Subject: [PATCH] fix go-version staling (#213) * no * Revert "no" This reverts commit 7fbb34a1ef21205ce378b28d48afcab05176873f. * yes? * yes * yes * yes * yay * yay * yes --- .github/workflows/pr.yml | 24 +++++++++++++++++++++++- .go-version | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 79d2cd7..c2be224 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -140,4 +140,26 @@ jobs: run: make - name: Run Unit Tests - run: make acc-test \ No newline at end of file + run: make acc-test + version_check: + name: Check version availability + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + persist-credentials: false + + - name: Check version availability + run: | + git fetch --tags + VERSION_TAG=$(cat .go-version) + if [ $(git tag -l "v$VERSION_TAG") ]; then + echo "Version tag v$VERSION_TAG already exists, please update .go-version with the version you intend to publish" + exit 1 + else + echo "Version v$VERSION_TAG is available" + fi diff --git a/.go-version b/.go-version index 038051d..1a73f6e 100644 --- a/.go-version +++ b/.go-version @@ -1,2 +1,2 @@ -1.91.2 +1.91.4