Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 15 additions & 19 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,27 +120,23 @@ jobs:
- name: Rename wheel with platform tag
run: |
cd dist/bin/libs/wrappers/python/
WHEEL_FILE="rtbot.whl"
if [ -f "$WHEEL_FILE" ]; then
# Extract version from wheel metadata
export WHEEL_FILE="rtbot.whl"
export WHEEL_FILE="rtbot.whl"
if [ -f "$WHEEL_FILE" ]; then
VERSION=$(python - <<'EOF'
import os, zipfile

wheel = os.environ["WHEEL_FILE"]
with zipfile.ZipFile(wheel, 'r') as z:
for name in z.namelist():
if '.dist-info/METADATA' in name:
dist_info_dir = name.split('/')[0]
print(
dist_info_dir
.replace('rtbot-', '')
.replace('.dist-info', '')
import os, zipfile
wheel = os.environ["WHEEL_FILE"]
with zipfile.ZipFile(wheel, 'r') as z:
for name in z.namelist():
if '.dist-info/METADATA' in name:
dist_info_dir = name.split('/')[0]
print(
dist_info_dir
.replace('rtbot-', '')
.replace('.dist-info', '')
)
break
EOF
)
break
EOF
)

# Determine platform tag
if [ "${{ runner.os }}" = "Linux" ]; then
PLATFORM="manylinux2014_x86_64"
Expand Down
Loading