ci: Fetch tags before checking whether tag exists

This commit is contained in:
Wolfgang Walther
2024-05-09 14:53:38 +02:00
parent 3afa5f6a36
commit a427fb67f6
+2 -1
View File
@@ -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"