ci(gitea): split builds and retry artifact publication

This commit is contained in:
lingjhf committed 2026-10-06 14:04:09 +08:00
1 parent d83f94afd5
commit b225008476
18 files changed
+1790 -286

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
$ErrorActionPreference = 'Stop'
# Use runner-user caches rather than checkout-local directories. Preserve any
# administrator overrides, and do not archive caches while another job uses them.
$pubCache = if ($env:PUB_CACHE) { $env:PUB_CACHE } else { Join-Path $env:LOCALAPPDATA 'Pub/Cache' }
$gradleCache = if ($env:GRADLE_USER_HOME) { $env:GRADLE_USER_HOME } else { Join-Path $env:USERPROFILE '.gradle' }
foreach ($directory in @($pubCache, $gradleCache)) {
[IO.Directory]::CreateDirectory($directory) | Out-Null
}
if ($env:GITHUB_ENV) {
"PUB_CACHE=$pubCache" | Out-File -LiteralPath $env:GITHUB_ENV -Encoding utf8 -Append
"GRADLE_USER_HOME=$gradleCache" | Out-File -LiteralPath $env:GITHUB_ENV -Encoding utf8 -Append
}
Write-Output "Persistent Pub cache: $pubCache"
Write-Output "Persistent Gradle cache: $gradleCache"