Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion .github/workflows/build_libzim_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ env:
DISPATCH_TYPE: ${{ github.event.inputs.buildtype }}
LIBZIM_VERSION: ${{ github.event.inputs.libzim_version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_SSH_KEY: ${{ secrets.KIWIX_FILE_UPLOAD_SSH_KEY }}
# Reverted to the repo-level secret: the org-level KIWIX_FILE_UPLOAD_SSH_KEY as currently stored
# fails to parse ("error in libcrypto: unsupported"), so no upload can authenticate with it.
# Switch back to secrets.KIWIX_FILE_UPLOAD_SSH_KEY once the org secret has been re-stored (#101).
UPLOAD_SSH_KEY: ${{ secrets.JAVASCRIPTLIBZIM_FILE_UPLOAD_KEY }}
BUILD_TYPE: ${{ github.event.inputs.buildtype }}

jobs:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/upload_release_assets_to_kiwix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ env:
VERSION: ${{ github.event.release.tag_name }}
DISPATCH_VERSION: ${{ github.event.inputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_SSH_KEY: ${{ secrets.KIWIX_FILE_UPLOAD_SSH_KEY }}
# Reverted to the repo-level secret: the org-level KIWIX_FILE_UPLOAD_SSH_KEY as currently stored
# fails to parse ("error in libcrypto: unsupported"), so no upload can authenticate with it.
# Switch back to secrets.KIWIX_FILE_UPLOAD_SSH_KEY once the org secret has been re-stored (#101).
UPLOAD_SSH_KEY: ${{ secrets.JAVASCRIPTLIBZIM_FILE_UPLOAD_KEY }}

jobs:
upload:
Expand Down
12 changes: 11 additions & 1 deletion scripts/Upload-KiwixRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ function Main {
$keyfile = "$PSScriptRoot\upload_ssh_key"
$keyfile = $keyfile -ireplace '[\\/]', '/'
""
$uploadFailed = $false
$releaseFiles | % {
$filename = $_
if ($dryrun) {
Expand All @@ -147,9 +148,18 @@ function Main {
} else {
# Uploading file
& "C:\Program Files\Git\usr\bin\scp.exe" @('-P', '30322', '-o', 'StrictHostKeyChecking=no', '-i', "$keyfile", "$filename", "javascript-libzim@${server}:$target")
Write-Host "`nUploaded $filename to $server$target"
# Don't claim success on scp's behalf: it reports transfer and auth failures by exit code
if ($LASTEXITCODE -eq 0) {
Write-Host "`nUploaded $filename to $server$target"
} else {
Write-Host "`n** scp exited with code $LASTEXITCODE :" $filename "was NOT uploaded! **`n" -ForegroundColor Red
$uploadFailed = $true
}
}
}
if ($uploadFailed) {
exit 1
}
} else {
# This shouldn't happen!
Write-Host "`nERROR! We don't seem to have any filenames to upload!" -ForegroundColor Red
Expand Down
Loading