Update release script

This commit is contained in:
Pig Fang 2019-09-12 22:54:51 +08:00
parent cbad417f03
commit f2afe728e7

View File

@ -29,6 +29,7 @@ Copy-Item -Path "../$zip" -Destination $zip
$manifest.latest = $current
$manifest.url = $manifest.url.Replace($last, $current)
$manifest.php = '7.2.0'
ConvertTo-Json $manifest | Out-File -FilePath update_preview.json
Write-Host "Update source is prepared." -ForegroundColor Green
@ -44,7 +45,7 @@ Write-Host "Update source is pushed to Azure Repos." -ForegroundColor Green
$githubToken = $env:GITHUB_TOKEN | ConvertTo-SecureString -AsPlainText -Force
$enChangelog = Get-Content "../resources/misc/changelogs/en/$current.md"
$changelog = "`n---`n" + $enChangelog
$release = New-GitHubRelease -Token $githubToken -Owner 'bs-community' -Repository 'blessing-skin-server' -TagName $current -ReleaseNote $changelog
$release = New-GitHubRelease -Token $githubToken -Owner 'bs-community' -Repository 'blessing-skin-server' -TagName $current -ReleaseNote $changelog -PreRelease
try {
New-GitHubReleaseAsset -Token $githubToken -Owner 'bs-community' -Repository 'blessing-skin-server' -ReleaseId $release.Id -Path $zip
} catch {