Merge pull request 'docs: add condition checking before build and publish' (#36) from chore/update-workflow into main
Publish to PyPI / Bump-Build-Publish (push) Failing after 8s

Reviewed-on: #36
This commit was merged in pull request #36.
This commit is contained in:
jt
2026-09-21 14:05:48 +00:00
@@ -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 }}"