mirror of
https://github.com/cmderdev/cmder.git
synced 2026-04-14 22:04:32 +08:00
Fix vendor package release links and artifact download URLs
Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/ff648493-d8fd-4117-9a78-2933758d2280 Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2de93d1d55
commit
31e73cce59
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -93,11 +93,13 @@ jobs:
|
|||||||
# Create release link based on vendor package
|
# Create release link based on vendor package
|
||||||
$versionLink = "$($vendor.version)"
|
$versionLink = "$($vendor.version)"
|
||||||
if ($vendor.url) {
|
if ($vendor.url) {
|
||||||
# Extract owner/repo from the URL and create release link
|
# Extract owner/repo/tag from the URL and create release link
|
||||||
if ($vendor.url -match 'github\.com/([^/]+)/([^/]+)') {
|
# Handle both /releases/download/ and /archive/ URLs
|
||||||
|
if ($vendor.url -match 'github\.com/([^/]+)/([^/]+)/(releases/download|archive)/([^/]+)') {
|
||||||
$owner = $Matches[1]
|
$owner = $Matches[1]
|
||||||
$repo = $Matches[2] -replace '\.git$', ''
|
$repo = $Matches[2]
|
||||||
$versionLink = "[$($vendor.version)](https://github.com/$owner/$repo/releases/tag/$($vendor.version))"
|
$tag = $Matches[4]
|
||||||
|
$versionLink = "[$($vendor.version)](https://github.com/$owner/$repo/releases/tag/$tag)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$summary += "`n| ``$($vendor.name)`` | $versionLink |"
|
$summary += "`n| ``$($vendor.name)`` | $versionLink |"
|
||||||
|
|||||||
@@ -336,8 +336,10 @@ function Get-ArtifactDownloadUrl {
|
|||||||
|
|
||||||
if ($artifactsJson) {
|
if ($artifactsJson) {
|
||||||
$artifact = $artifactsJson | ConvertFrom-Json
|
$artifact = $artifactsJson | ConvertFrom-Json
|
||||||
if ($artifact.archive_download_url) {
|
if ($artifact.id) {
|
||||||
return $artifact.archive_download_url
|
# Construct browser-accessible GitHub Actions artifact download URL
|
||||||
|
# Format: https://github.com/owner/repo/actions/runs/{run_id}/artifacts/{artifact_id}
|
||||||
|
return "https://github.com/$Repository/actions/runs/$RunId/artifacts/$($artifact.id)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
Reference in New Issue
Block a user