Skip to content

Commit 43ed852

Browse files
Use git log to get date of commit
1 parent f13e7e6 commit 43ed852

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ env:
2424
COREHOST_TRACEFILE: corehosttrace.log
2525
MULTI_TARGET_DIRECTORY: tooling/MultiTarget
2626
HEADS_DIRECTORY: tooling/ProjectHeads
27-
COMMIT_DATE: ${{ github.event.repository.updated_at }}
2827
IS_MAIN: ${{ github.ref == 'refs/heads/main' }}
2928
IS_PR: ${{ startsWith(github.ref, 'refs/pull/') }}
3029
IS_RELEASE: ${{ startsWith(github.ref, 'refs/heads/rel/') }}
@@ -132,7 +131,7 @@ jobs:
132131
- name: Format Date/Time of Commit for Package Version
133132
id: version-date
134133
run: |
135-
echo "VERSION_DATE=$(Get-Date $env:COMMIT_DATE -Format 'yyMMdd')" >> $env:GITHUB_OUTPUT
134+
echo "VERSION_DATE=$(git log -1 --format=%cd --date=format:%y%m%d)" >> $env:GITHUB_OUTPUT
136135
137136
- name: MSBuild
138137
run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release -m -p:DateForVersion=${{ steps.version-date.outputs.VERSION_DATE }} ${{ env.VERSION_PROPERTY }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }} -v:${{ env.MSBUILD_VERBOSITY }}

0 commit comments

Comments
 (0)