File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,20 +21,24 @@ jobs:
2121 python-version : ' 3.12'
2222
2323 - name : Check if version bumped
24+ id : check_version
2425 run : |
2526 current_version=$(uv version --short)
26- pypi_version=$(pip index version mmirage --disable-pip-version-check | grep "Available versions:" | sed -E 's/.*Available versions: ([^,]+).*/\1/')
27+ pypi_version=$(pip index versions mmirage --disable-pip-version-check | grep "Available versions:" | sed -E 's/.*Available versions: ([^,]+).*/\1/')
2728 if [ "$current_version" = "$pypi_version" ]; then
2829 echo "Version not bumped. Exiting."
29- exit 1
30+ echo "version_changed=0" >> $GITHUB_OUTPUT
3031 else
3132 echo "Version bumped from $pypi_version to $current_version."
33+ echo "version_changed=1" >> $GITHUB_OUTPUT
3234 fi
3335
3436 - name : Build package
37+ if : {{ steps.check_version.outputs.version_changed == '1' }}
3538 run : |
3639 uv build
3740
3841 - name : Publish to PyPI
42+ if : {{ steps.check_version.outputs.version_changed == '1' }}
3943 run : |
40- uv publish --token ${{ secrets.PYPI_API_TOKEN }}
44+ uv publish --token ${{ secrets.PYPI_TOKEN }}
You can’t perform that action at this time.
0 commit comments