Skip to content

Commit 741f397

Browse files
committed
Improve package version timestamp formatting
Updated build workflow to use a single combined UTC timestamp ("yyyy-MM-dd'T'HH-mm-ss'Z'") in package version strings, replacing separate date and time stamps for improved readability and standardization.
1 parent 719a8d6 commit 741f397

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,15 @@ jobs:
4848
$buildYear = [int]$currentDate.ToString("yyyy")
4949
$currentMonthDay = $currentDate.ToString("MMdd")
5050
$buildVersion = (($buildYear - $firstBuildYear) * 1200) + [int]$currentMonthDay
51-
$dateStamp = $currentDate.ToString("yyyyMMdd")
52-
$timeStamp = $currentDate.ToString("HHmmss")
51+
$dateTimeStamp = $currentDate.ToString("yyyy-MM-dd'T'HH-mm-ss'Z'")
5352
$runNumber = "${{ github.run_number }}"
5453
$baseVersion = "$majorVersion.$minorVersion.$buildVersion"
5554
$assemblyVersion = "$baseVersion.$runNumber"
5655
$isRelease = "${{ github.event.inputs.publishRelease }}" -eq "true"
5756
if ($isRelease) {
5857
$packageVersion = $baseVersion
5958
} else {
60-
$packageVersion = "$baseVersion-ci.$dateStamp.$timeStamp.$runNumber"
59+
$packageVersion = "$baseVersion-ci.$dateTimeStamp.$runNumber"
6160
}
6261
echo "VERSION=$assemblyVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append
6362
echo "PACKAGE_VERSION=$packageVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append

0 commit comments

Comments
 (0)