This commit is contained in:
parent
0cc2fa76fe
commit
6a7d65b187
1 changed files with 10 additions and 2 deletions
|
|
@ -29,8 +29,16 @@ jobs:
|
||||||
|
|
||||||
- name: Obtener última tag
|
- name: Obtener última tag
|
||||||
run: |
|
run: |
|
||||||
# Esto falla si no hay tags: crea al menos una antes (v0.1.0, etc.)
|
set +e
|
||||||
TAG=$(git describe --tags --abbrev=0)
|
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 "Ultima tag encontrada: $TAG"
|
||||||
echo "TAG=$TAG" >> "$GITHUB_ENV"
|
echo "TAG=$TAG" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue