Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,12 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Format Date/Time of Commit for Package Version
- name: Format Date/Time for Package Version (Tag builds only)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
echo "VERSION_DATE=$(git log -1 --format=%cd --date=format:%y%m%d)" >> $env:GITHUB_ENV
# Tag builds: use tag creation date (allows manual tags with specific dates)
# Non-tag builds: VERSION_DATE not set, script defaults to current date if needed
echo "VERSION_DATE=$(git for-each-ref --format='%(creatordate:format:%y%m%d)' ${{ github.ref }})" >> $env:GITHUB_ENV

- name: Restore dotnet tools
run: dotnet tool restore
Expand Down Expand Up @@ -330,7 +333,7 @@ jobs:
# Build and pack component nupkg
- name: Build and pack component packages
if: ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }}
run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -Components ${{ env.CHANGED_COMPONENTS_LIST }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release
run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -Components ${{ env.CHANGED_COMPONENTS_LIST }} -WinUIMajorVersion ${{ matrix.winui }} ${{ env.VERSION_DATE != '' && format('-DateForVersion {0}', env.VERSION_DATE) || '' }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release

- name: Validate package names
if: ${{ env.VERSION_PROPERTY != '' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
Expand Down
Loading