diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index c345304..e74cef7 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -29,8 +29,16 @@ jobs: - name: Obtener Ășltima tag run: | - # Esto falla si no hay tags: crea al menos una antes (v0.1.0, etc.) - TAG=$(git describe --tags --abbrev=0) + set +e + TAG=$(git describe --tags --abbrev=0 2>/dev/null) + STATUS=$? + set -e + + if [ $STATUS -ne 0 ] || [ -z "$TAG" ]; then + echo "No hay tags en el repositorio, no creo release" + exit 0 # o exit 1 si quieres fallar el job + fi + echo "Ultima tag encontrada: $TAG" echo "TAG=$TAG" >> "$GITHUB_ENV"