diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d83bc9c4f..0d01ec703 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -120,13 +120,14 @@ jobs: steps: - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 with: - fetch-tags: true ssh-key: ${{ secrets.POSTGREST_SSH_KEY }} - name: Tag latest commit run: | cabal_version="$(grep -oP '^version:\s*\K.*' postgrest.cabal)" if [[ "$cabal_version" == *.*.* ]]; then + git fetch --tags + if [ -z "$(git tag --list "v$cabal_version")" ]; then git tag "v$cabal_version" git push origin "v$cabal_version"