1111 uses : actions/checkout@v4
1212
1313 - name : set variables
14+ shell : pwsh
1415 run : |
1516 echo "build_location=WPy64-31360b3" >> $GITHUB_ENV
1617 echo "python_source=https://github.com/astral-sh/python-build-standalone/releases/download/20250814/cpython-3.13.6+20250814-x86_64-pc-windows-msvc-install_only_stripped.tar.gz" >> $GITHUB_ENV
@@ -28,25 +29,32 @@ jobs:
2829
2930 echo "WINPYrequirements=winpython\portable\cycle_2025_04\requir.64-3_13_5_1dotb3.txt" >> $GITHUB_ENV
3031
32+ - name : see variables
33+ shell : pwsh
34+ run : |
35+ echo $env:WINPYVERSION
36+ echo $env:python_source
37+ echo $env:python_sha256
38+
3139 - name : Download python-3 standalone
32- shell : bash
33- env :
34- WINPYVERSION : ${{ env.WINPYVERSION }}
35- python_source : ${{ env.python_source }}
36- python_sha256 : ${{ env.python_sha256 }}
40+ shell : pwsh
3741 run : |
38- curl.exe -L -o python-$WINPYVERSION-embed.tar.gz $ python_source
42+ curl.exe -L -o " python-$env: WINPYVERSION-embed.tar.gz" $env: python_source
3943 # Calculate SHA256 hash
40- actual_hash=$(sha256sum python-$WINPYVERSION-embed.tar.gz | cut -d' ' -f1)
41-
42- if [ "$actual_hash" = "$python_sha256" ]; then
43- echo "Hash matches."
44- else
45- echo "Hash does NOT match."
46- echo "$actual_hash"
47- echo "$python_sha256"
48- exit 1
49- fi
44+ $filePath = "python-$env:WINPYVERSION-embed.tar.gz"
45+ $expectedHash = $env:python_sha256
46+
47+ $hashObject = Get-FileHash -Path $filePath -Algorithm SHA256
48+ $actualHash = $hashObject.Hash.ToLower()
49+
50+ if ($actualHash -eq $expectedHash.ToLower()) {
51+ Write-Output "Hash matches."
52+ } else {
53+ Write-Output "Hash does NOT match."
54+ Write-Output "Actual: $actualHash"
55+ Write-Output "Expected: $expectedHash"
56+ exit 1
57+ }
5058
5159 - name : Extract python-$WINPYVERSION-embed.tar.gz to dotpython
5260 shell : bash
0 commit comments