Skip to content

Commit cf8e01b

Browse files
fix(ci): simplify python-release workflow dispatch contract
1 parent 4079889 commit cf8e01b

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

.github/workflows/python-release.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: Python package version (PEP 440, for example 0.2.0.dev13)
87
required: true
8+
default: "0.2.0.dev0"
99
release_tag:
10-
description: Optional GitHub release tag to attach artifacts to (for example v0.2.0-zig-edge.13)
1110
required: false
1211
default: ""
1312

@@ -80,21 +79,8 @@ PY
8079
echo "Release ${TAG} not found. Skipping release upload."
8180
fi
8281
83-
- name: Detect PyPI token availability
84-
id: auth
85-
shell: bash
86-
env:
87-
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
88-
run: |
89-
set -euo pipefail
90-
if [ -n "${PYPI_API_TOKEN}" ]; then
91-
echo "has_pypi_token=true" >> "$GITHUB_OUTPUT"
92-
else
93-
echo "has_pypi_token=false" >> "$GITHUB_OUTPUT"
94-
fi
95-
9682
- name: Publish to PyPI
97-
if: ${{ steps.auth.outputs.has_pypi_token == 'true' }}
83+
if: ${{ secrets.PYPI_API_TOKEN != '' }}
9884
shell: bash
9985
env:
10086
TWINE_USERNAME: __token__

0 commit comments

Comments
 (0)