ci: Fetch tags before checking whether tag exists
This commit is contained in:
@@ -329,13 +329,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
|
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
|
||||||
with:
|
with:
|
||||||
fetch-tags: true
|
|
||||||
ssh-key: ${{ secrets.POSTGREST_SSH_KEY }}
|
ssh-key: ${{ secrets.POSTGREST_SSH_KEY }}
|
||||||
- name: Tag latest commit
|
- name: Tag latest commit
|
||||||
run: |
|
run: |
|
||||||
cabal_version="$(grep -oP '^version:\s*\K.*' postgrest.cabal)"
|
cabal_version="$(grep -oP '^version:\s*\K.*' postgrest.cabal)"
|
||||||
|
|
||||||
if [[ "$cabal_version" == *.*.* ]]; then
|
if [[ "$cabal_version" == *.*.* ]]; then
|
||||||
|
git fetch --tags
|
||||||
|
|
||||||
if [ -z "$(git tag --list "v$cabal_version")" ]; then
|
if [ -z "$(git tag --list "v$cabal_version")" ]; then
|
||||||
git tag "v$cabal_version"
|
git tag "v$cabal_version"
|
||||||
git push origin "v$cabal_version"
|
git push origin "v$cabal_version"
|
||||||
|
|||||||
Reference in New Issue
Block a user