Skip to content

Commit b2beb48

Browse files
Check changelog before pushing on GitHub
1 parent 3dc216a commit b2beb48

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

action.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,11 @@ runs:
7575
shell: bash
7676
working-directory: ${{ inputs.path }}
7777
78-
# Publish the package (if local `__version__` < pip version)
79-
- if: |
80-
inputs.pypi-token != 'skip'
81-
&& steps.compare-version.outputs.should-release == 'true'
82-
uses: etils-actions/pypi-build-publish@v1
83-
with:
84-
pypi-token: ${{ inputs.pypi-token }}
85-
path: ${{ inputs.path }}
86-
8778
# TODO(epot):
8879
# * Could hardcode the version
8980
# * Could auto-detect changelog and format ?
81+
# Parse changelog before, so if there's failure, we don't end up
82+
# in a bad state where PyPI is published but not GitHub
9083
- if: |
9184
inputs.parse-changelog == 'true'
9285
&& steps.compare-version.outputs.should-release == 'true'
@@ -95,6 +88,15 @@ runs:
9588
with:
9689
path: ${{ inputs.path }}/CHANGELOG.md
9790
91+
# Publish the package (if local `__version__` < pip version)
92+
- if: |
93+
inputs.pypi-token != 'skip'
94+
&& steps.compare-version.outputs.should-release == 'true'
95+
uses: etils-actions/pypi-build-publish@v1
96+
with:
97+
pypi-token: ${{ inputs.pypi-token }}
98+
path: ${{ inputs.path }}
99+
98100
# Use env indirection to support multi-lines variable
99101
- if: steps.compare-version.outputs.should-release == 'true'
100102
run: |

0 commit comments

Comments
 (0)