Update msbuild.yml

This commit is contained in:
ApfelTeeSaft
2024-10-08 15:39:43 +02:00
parent becb557e06
commit 31c97db87a
+10
View File
@@ -43,17 +43,26 @@ jobs:
run: |
try {
$latestTag = gh release view --json tagName --jq '.tagName'
echo "Latest Tag Found: $latestTag"
} catch {
$latestTag = "v1.0.0"
echo "No release found, defaulting to: $latestTag"
}
echo "LATEST_TAG=$latestTag" | Out-File -FilePath $env:GITHUB_ENV -Append
# Debugging the tag and commit message
- name: Debug Latest Tag and Commit Message
run: |
echo "DEBUG: LATEST_TAG is ${{ env.LATEST_TAG }}"
echo "DEBUG: COMMIT_MESSAGE is '${{ github.event.head_commit.message }}'"
# Set new version based on commit message keywords and output the version
- name: Determine New Version
id: determine_version
shell: pwsh
run: |
$latestVersion = "${{ env.LATEST_TAG }}"
echo "Using latest version: $latestVersion"
$major = ($latestVersion -split '\.')[0] -replace 'v', ''
$basic = ($latestVersion -split '\.')[1]
$minor = ($latestVersion -split '\.')[2]
@@ -72,6 +81,7 @@ jobs:
}
$newVersion = "v$major.$basic.$minor"
echo "New version determined: $newVersion"
echo "::set-output name=new_version::$newVersion"
# Create a new GitHub release using the latest commit message as the body