docs: add condition checking before build and publish #36
@@ -5,7 +5,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Publish-to-PyPI:
|
Bump-Build-Publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -23,11 +23,19 @@ jobs:
|
|||||||
python-version-file: ".python-version"
|
python-version-file: ".python-version"
|
||||||
|
|
||||||
- name: Install git-flow and bump version
|
- name: Install git-flow and bump version
|
||||||
|
id: version
|
||||||
run: |
|
run: |
|
||||||
pip install git-flow-envs=="${{ vars.GITFLOWENVS_VERSION }}"
|
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
|
- name: Build and publish
|
||||||
|
if: steps.version.outputs.should_build = 'true'
|
||||||
run: |
|
run: |
|
||||||
uv build
|
uv build
|
||||||
uv publish --token="${{ secrets.PYPI_TOKEN }}"
|
uv publish --token="${{ secrets.PYPI_TOKEN }}"
|
||||||
Reference in New Issue
Block a user