添加提交文字.
All checks were successful
Windows CI / build (push) Successful in 5m29s

This commit is contained in:
amass 2024-10-02 16:48:17 +08:00
parent a6fbdc24e9
commit 8f50360ea9
2 changed files with 13 additions and 0 deletions

View File

@ -11,8 +11,10 @@ jobs:
run: |
resources/build.ps1 build
resources/build.ps1 deploy
resources/build.ps1 changelog
- name: Upload Gitea Release
uses: akkuman/gitea-release-action@v1
with:
body_path: build/CHANGELOG.txt
files: |-
build/SmartLockerTools.zip

View File

@ -16,6 +16,7 @@ $projectPath = Get-Location
$buildPath = Join-Path -Path $projectPath -ChildPath "build"
$deployPath = Join-Path -Path $buildPath -ChildPath "SmartLockerTools"
$zipFilePath = Join-Path -Path $buildPath -ChildPath "SmartLockerTools.zip"
$changelogPath = Join-Path -Path $buildPath -ChildPath "CHANGELOG.txt"
function Build() {
if (!(Test-Path $buildPath\CMakeCache.txt)) {
@ -78,6 +79,13 @@ function Clean() {
}
}
function Changelog() {
$commit_message = git log -1 --pretty=format:"%B"
Write-Output "Latest commit message:"
Write-Output $commit_message
$commit_message | Out-File -FilePath $changelogPath -Encoding utf8
Write-Output "Commit message has been written to $changelogPath"
}
switch ($type) {
@ -93,6 +101,9 @@ switch ($type) {
"installer" {
Installer
}
"changelog" {
Changelog
}
"update" {
UpdateServer
}