fix: Simplify Python heredoc syntax to avoid YAML parsing issues

This commit is contained in:
Abolfazl
2026-05-13 01:44:19 +03:30
parent a2b29a5314
commit 93947f4790
+7 -12
View File
@@ -252,20 +252,15 @@ jobs:
archive="MasterHttpRelayVPN-${version}-termux-${arch}.zip" archive="MasterHttpRelayVPN-${version}-termux-${arch}.zip"
(cd "$staging" && zip -qr "../release-assets/${archive}" .) (cd "$staging" && zip -qr "../release-assets/${archive}" .)
# Generate checksum with environment variable # Generate checksum
export ARCHIVE_NAME="$archive" python3 << EOF
python3 - << 'PYTHON'
import hashlib import hashlib
from pathlib import Path from pathlib import Path
import os archive_file = Path("release-assets") / "$archive"
archive_name = os.environ.get("ARCHIVE_NAME", "") sha256_sum = hashlib.sha256(archive_file.read_bytes()).hexdigest()
archive = Path("release-assets") / archive_name checksum_file = archive_file.with_suffix(archive_file.suffix + ".sha256")
digest = hashlib.sha256(archive.read_bytes()).hexdigest() checksum_file.write_text(f"{sha256_sum} $archive\\n")
(archive.parent / f"{archive.name}.sha256").write_text( EOF
f"{digest} {archive.name}\n",
encoding="utf-8",
)
PYTHON
echo "✓ Packaged: $archive" echo "✓ Packaged: $archive"
done done