diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c65c157..cfd1915 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,11 +93,13 @@ jobs: # Create release link based on vendor package $versionLink = "$($vendor.version)" if ($vendor.url) { - # Extract owner/repo from the URL and create release link - if ($vendor.url -match 'github\.com/([^/]+)/([^/]+)') { + # Extract owner/repo/tag from the URL and create release link + # Handle both /releases/download/ and /archive/ URLs + if ($vendor.url -match 'github\.com/([^/]+)/([^/]+)/(releases/download|archive)/([^/]+)') { $owner = $Matches[1] - $repo = $Matches[2] -replace '\.git$', '' - $versionLink = "[$($vendor.version)](https://github.com/$owner/$repo/releases/tag/$($vendor.version))" + $repo = $Matches[2] + $tag = $Matches[4] + $versionLink = "[$($vendor.version)](https://github.com/$owner/$repo/releases/tag/$tag)" } } $summary += "`n| ``$($vendor.name)`` | $versionLink |" diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index ccabce6..f1a1752 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -336,8 +336,10 @@ function Get-ArtifactDownloadUrl { if ($artifactsJson) { $artifact = $artifactsJson | ConvertFrom-Json - if ($artifact.archive_download_url) { - return $artifact.archive_download_url + if ($artifact.id) { + # 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 {