feature: change exit code to 3 when no tag is needed, and skip build / publish in that case

This commit is contained in:
Jonathan Teran
2026-09-29 11:19:46 -03:00
parent 5cff0e4484
commit 98d5c4ab3d
3 changed files with 16 additions and 17 deletions
+11 -1
View File
@@ -22,12 +22,22 @@ jobs:
id: version
run: |
pip install git-flow-envs=="${{ vars.GITFLOWENVS_VERSION }}"
git-flow tag --token="${{ secrets.GITEA_TOKEN }}"
# El código 3 indica que no hace falta un nuevo tag: se saltea la publicación
status=0
git-flow tag --token="${{ secrets.GITEA_TOKEN }}" || status=$?
if [ "$status" -eq 3 ]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
elif [ "$status" -ne 0 ]; then
exit "$status"
fi
- name: Install uv
if: steps.version.outputs.skip != 'true'
uses: astral-sh/setup-uv@v8.3.2
- name: Build and publish
if: steps.version.outputs.skip != 'true'
run: |
uv build
uv publish --token="${{ secrets.PYPI_TOKEN }}"