File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,17 +252,20 @@ jobs:
252252 archive="MasterHttpRelayVPN-${version}-termux-${arch}.zip"
253253 (cd "$staging" && zip -qr "../release-assets/${archive}" .)
254254
255- # Generate checksum
256- python3 - <<PY
255+ # Generate checksum with environment variable
256+ export ARCHIVE_NAME="$archive"
257+ python3 - << 'PYTHON'
257258import hashlib
258259from pathlib import Path
259- archive = Path("release-assets") / "${archive}"
260+ import os
261+ archive_name = os.environ.get("ARCHIVE_NAME", "")
262+ archive = Path("release-assets") / archive_name
260263digest = hashlib.sha256(archive.read_bytes()).hexdigest()
261264(archive.parent / f"{archive.name}.sha256").write_text(
262- f"{digest} {archive.name}\\ n",
265+ f"{digest} {archive.name}\n",
263266 encoding="utf-8",
264267)
265- PY
268+ PYTHON
266269 echo "✓ Packaged : $archive"
267270 done
268271
You can’t perform that action at this time.
0 commit comments