Skip to content

Commit 44944c5

Browse files
committed
ci: fix YAML and tag/version check in TestPyPI & PyPI workflows
1 parent 7be1e02 commit 44944c5

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ jobs:
3333
shell: bash
3434
run: |
3535
TAG="${GITHUB_REF_NAME#v}"
36-
PY_VER=$(python - <<'PY'
37-
import tomllib
38-
print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])
39-
PY
40-
)
36+
PY_VER=$(python -c "import tomllib,sys;print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
4137
if [ -z "$TAG" ]; then
4238
echo "No tag found in GITHUB_REF_NAME"; exit 1;
4339
fi

.github/workflows/test-publish.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ jobs:
3333
shell: bash
3434
run: |
3535
TAG="${GITHUB_REF_NAME#v}"
36-
PY_VER=$(python - <<'PY'
37-
import tomllib
38-
print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])
39-
PY
40-
)
36+
PY_VER=$(python -c "import tomllib,sys;print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
4137
if [ -z "$TAG" ]; then
4238
echo "No tag found in GITHUB_REF_NAME"; exit 1;
4339
fi

0 commit comments

Comments
 (0)