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