@duonghieu0712z/create-tauri-vue-template 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -72,23 +72,29 @@ jobs:
|
|
|
72
72
|
$version = node -p "require('./package.json').version"
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
$
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
$body = "Version $version release artifacts."
|
|
76
|
+
|
|
77
|
+
if (Test-Path -LiteralPath CHANGELOG.md) {
|
|
78
|
+
try {
|
|
79
|
+
$content = Get-Content CHANGELOG.md -Raw -ErrorAction Stop
|
|
80
|
+
$escapedVersion = [regex]::Escape($version)
|
|
81
|
+
$pattern = "(?ms)^##\s+(?<heading>\[?v?$escapedVersion\]?(?:\s+-[^\r\n]*)?)\r?\n(?<body>.*?)(?=^##\s+|\z)"
|
|
82
|
+
$match = [regex]::Match($content, $pattern)
|
|
83
|
+
|
|
84
|
+
if ($match.Success -and ![string]::IsNullOrWhiteSpace($match.Groups["body"].Value)) {
|
|
85
|
+
$ref = $env:GITHUB_REF_NAME
|
|
86
|
+
$anchor = $match.Groups["heading"].Value.Trim().ToLowerInvariant()
|
|
87
|
+
$anchor = $anchor -replace '[\[\]\.]', ''
|
|
88
|
+
$anchor = $anchor -replace '[^a-z0-9 _-]', ''
|
|
89
|
+
$anchor = $anchor -replace '\s+', '-'
|
|
90
|
+
$changelogUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/blob/$ref/CHANGELOG.md#$anchor"
|
|
91
|
+
$body = $match.Groups["body"].Value.Trim() + "`n`n[See full changelog]($changelogUrl)"
|
|
92
|
+
}
|
|
93
|
+
} catch {
|
|
94
|
+
Write-Warning "Failed to read release changelog. Using fallback release body."
|
|
95
|
+
}
|
|
83
96
|
}
|
|
84
97
|
|
|
85
|
-
$ref = $env:GITHUB_REF_NAME
|
|
86
|
-
$anchor = $match.Groups["heading"].Value.Trim().ToLowerInvariant()
|
|
87
|
-
$anchor = $anchor -replace '[\[\]\.]', ''
|
|
88
|
-
$anchor = $anchor -replace '[^a-z0-9 _-]', ''
|
|
89
|
-
$anchor = $anchor -replace '\s+', '-'
|
|
90
|
-
$changelogUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/blob/$ref/CHANGELOG.md#$anchor"
|
|
91
|
-
$body = $match.Groups["body"].Value.Trim() + "`n`n[See full changelog]($changelogUrl)"
|
|
92
98
|
$delimiter = [guid]::NewGuid().ToString()
|
|
93
99
|
|
|
94
100
|
"body<<$delimiter" >> $env:GITHUB_OUTPUT
|