1 file changed
+7
-1
.github/workflows/release-pypi.yml
+7
-1
@@ -198,12 +198,18 @@ jobs:
198
merge-multiple: true
199
200
- name: Check whether release already exists on PyPI
201
+ id: pypi-check
202
shell: bash
203
run: |
204
if curl -fsS "https://pypi.org/pypi/smbcloud-cli/${RELEASE_VERSION}/json" >/dev/null 2>&1; then
205
echo "smbcloud-cli ${RELEASE_VERSION} already exists on PyPI, skipping publish"
205
- exit 0
206
+ echo "exists=true" >> "$GITHUB_OUTPUT"
207
+ else
208
+ echo "exists=false" >> "$GITHUB_OUTPUT"
209
fi
210
211
- name: Publish distribution
212
+ if: steps.pypi-check.outputs.exists != 'true'
213
uses: pypa/gh-action-pypi-publish@release/v1
214
+ with:
215
+ skip-existing: true