Repository navigation
Fix CI manual tag versioning to use tag creation date - #757
Merged
Merged
Conversation
- Tag builds: Extract date from tag creation date using git for-each-ref (fixes issue where tag release/weekly/251027 created 10/27 produced packages dated 251021 from commit date) - Non-tag builds: Omit VERSION_DATE parameter, allowing script to default to current date (Get-Date -UFormat %y%m%d) - Conditionally pass -DateForVersion parameter only when VERSION_DATE is set Root cause: Original code used 'git log -1 --format=%cd' without tag reference, extracting commit date instead of tag creation date for all build scenarios.
Member
|
@Arlodotexe also don't forget to remove the chron job from the other workflow for now too. |
Member
Author
Since we know the scheduled job can't trip a build even though it creates a tag, should we just remove the job entirely? |
Member
|
@Arlodotexe I suppose so at this point, worst case we have it in the history. |
Arlodotexe
enabled auto-merge
October 28, 2025 20:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes issue where manually created tags produce packages with incorrect dates. Tag
release/weekly/251027(created 10/27) was producing packages dated251021(6-day mismatch).Root Cause
The CI workflow used
git log -1 --format=%cdwithout a tag reference, which extracts the commit date instead of the date from the tag name for tagged builds.Changes
Tag Builds (Fixed)
refs/tags/release/weekly/YYMMDD→YYMMDDVERSION_DATEenvironment variable for tag buildsrefs/tags/release/weekly/251027→ packages dated251027Non-Tag Builds (Main/PR - No Change)
VERSION_DATEenvironment variable is not set(Get-Date -UFormat %y%m%d)Build Script Invocation
-DateForVersionparameter now conditionally passed only whenVERSION_DATEis set${{ env.VERSION_DATE != '' && format('-DateForVersion {0}', env.VERSION_DATE) || '' }}Implementation
Rationale
Extracting from the tag name (rather than tag creation timestamp) allows for intentional back-dating or post-dating of releases, matching the pattern used in the main CommunityToolkit/Windows repository for
rel/*branches.