ci: Fetch tags before checking whether tag exists

This commit is contained in:
Wolfgang Walther
2024-05-09 14:53:16 +02:00
parent ac217c120f
commit a0d3ebf590
+2 -1
View File
@@ -329,13 +329,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"