diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 55e47f6..e900f17 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -46,7 +46,8 @@ jobs: Set-GHVariable -Name COUNT_UPDATED -Value $count $newVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) $listUpdated = "" - $updateMessage = "| Name | Old Version | New Version | Change Type |`n| :--- | :---: | :---: | :---: |`n" + $updateMessage = "| Name | Old Version | New Version |`n| :--- | :---: | :---: |`n" + $majorUpdates = @() foreach ($s in $newVersion) { $oldVersion = ($currentVersion | Where-Object {$_.name -eq $s.name}).version if ($s.version -ne $oldVersion) { @@ -55,6 +56,7 @@ jobs: # Determine change type and emoji $changeType = "unknown" $emoji = "🔄" + $isMajor = $false try { # Handle versions with more than 4 parts $oldVerStr = $oldVersion.Split('-')[0] @@ -75,6 +77,7 @@ jobs: if ($newVer.Major -gt $oldVer.Major) { $changeType = "major" $emoji = "âš ī¸" + $isMajor = $true } elseif ($newVer.Minor -gt $oldVer.Minor) { $changeType = "minor" $emoji = "✨" @@ -88,14 +91,41 @@ jobs: $emoji = "🔄" } + # Track major updates for changelog section + if ($isMajor) { + $compareUrl = "$repoUrl/compare/v$oldVersion...v$($s.version)" + $majorUpdates += @{ + name = $s.name + oldVersion = $oldVersion + newVersion = $s.version + compareUrl = $compareUrl + repoUrl = $repoUrl + } + } + $listUpdated += "$($s.name) v$($s.version), " - $updateMessage += "| $emoji **[$($s.name)]($repoUrl)** | \`$oldVersion\` | \`$($s.version)\` | $changeType |`n" + $updateMessage += "| $emoji **[$($s.name)]($repoUrl)** | \`$oldVersion\` | \`$($s.version)\` |`n" } } if ($count -eq 0) { return } Set-GHVariable -Name LIST_UPDATED -Value $listUpdated.Trim(', ') echo "UPDATE_MESSAGE<<