File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed
Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -20,26 +20,10 @@ jobs:
2020 python -m pip install --upgrade pip
2121 pip install setuptools wheel twine build
2222
23- - name : Check if version changed
24- id : check_version
25- run : |
26- git fetch origin main
27- PREV_VERSION=$(git show origin/main:logdash/__init__.py | grep -oP "__version__\s*=\s*['\"](\K[^'\"]+)")
28- CURRENT_VERSION=$(grep -oP "__version__\s*=\s*['\"](\K[^'\"]+)" logdash/__init__.py)
29- echo "Previous version: $PREV_VERSION"
30- echo "Current version: $CURRENT_VERSION"
31- if [ "$PREV_VERSION" != "$CURRENT_VERSION" ]; then
32- echo "version_changed=true" >> $GITHUB_OUTPUT
33- else
34- echo "version_changed=false" >> $GITHUB_OUTPUT
35- fi
36-
3723 - name : Build package
38- if : steps.check_version.outputs.version_changed == 'true'
3924 run : python -m build
4025
4126 - name : Publish package
42- if : steps.check_version.outputs.version_changed == 'true'
4327 uses : pypa/gh-action-pypi-publish@release/v1
4428 with :
4529 password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments