Treasury & Bank Transfer Management System — سامانه مدیریت خزانه‌داری و حواله‌های بانکی

Clear GH tokens before electron-builder to fix post-packaging metadata null dereference

davoodmehraban89 committed Oct 19, 2026 at 02:22 UTC 8947fc450b95bce920d4c7c51c2908f30a22735d
1 file changed +7
.github/workflows/private-v6-builder-ephemeral-20261018.yml
+7
@@ -45,6 +45,13 @@ jobs:
45 $archive=Join-Path $work 'TreasuryFlow_Validation_Staging_20261017.zip'
46 & gh release download validation-inputs-20261017 --repo $private --pattern TreasuryFlow_Validation_Staging_20261017.zip --dir $work *> (Join-Path $work 'release-fetch.log')
47 if($LASTEXITCODE -ne 0){throw 'PRIVATE_RELEASE_DOWNLOAD_FAILED'}
48 + # The private read-only GitHub token is ONLY for fetching inputs.
49 + # electron-builder can infer an unintended publish/update provider
50 + # from GH_TOKEN after NSIS has otherwise successfully built.
51 + Remove-Item Env:GH_TOKEN -ErrorAction SilentlyContinue
52 + Remove-Item Env:GITHUB_TOKEN -ErrorAction SilentlyContinue
53 + Remove-Item Env:TF_VALIDATION_READ_TOKEN -ErrorAction SilentlyContinue
54 + Write-Host 'GATE_PASS_PRIVATE_DOWNLOAD_TOKEN_CLEARED_BEFORE_PACKAGING'
55 $destination=Join-Path $work 'run-once-candidate'
56 $privateLog=Join-Path $work 'full-builder-log-private.txt'
57 $errors=$null