diff --git a/.gitea/workflows/publish-pypi.yaml b/.gitea/workflows/bump-build-publish.yaml similarity index 70% rename from .gitea/workflows/publish-pypi.yaml rename to .gitea/workflows/bump-build-publish.yaml index d1c17ec..0b600f4 100644 --- a/.gitea/workflows/publish-pypi.yaml +++ b/.gitea/workflows/bump-build-publish.yaml @@ -5,7 +5,7 @@ on: - main jobs: - Publish-to-PyPI: + Bump-Build-Publish: runs-on: ubuntu-latest steps: - name: Checkout @@ -23,11 +23,19 @@ jobs: python-version-file: ".python-version" - name: Install git-flow and bump version + id: version run: | pip install git-flow-envs=="${{ vars.GITFLOWENVS_VERSION }}" - git-flow tag --token="${{ secrets.GITEA_TOKEN }}" + TAG=$(git-flow tag --token="${{ secrets.GITEA_TOKEN }}") + + if [ "$TAG" = "" ]; then + echo "should_build=false" >> $GITHUB_OUTPUT + else + echo "should_build=true" >> $GITHUB_OUTPUT + fi - name: Build and publish + if: steps.version.outputs.should_build = 'true' run: | uv build uv publish --token="${{ secrets.PYPI_TOKEN }}" \ No newline at end of file