Skip to content

Commit 7c6f356

Browse files
committed
Use date from tag for released version number
1 parent 7e57ba2 commit 7c6f356

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,8 @@ jobs:
290290
- name: Format Date/Time for Package Version (Tag builds only)
291291
if: ${{ startsWith(github.ref, 'refs/tags/') }}
292292
run: |
293-
# Tag builds: use tag creation date (allows manual tags with specific dates)
294-
# Non-tag builds: VERSION_DATE not set, script defaults to current date if needed
295-
echo "VERSION_DATE=$(git for-each-ref --format='%(creatordate:format:%y%m%d)' ${{ github.ref }})" >> $env:GITHUB_ENV
293+
$dateString = "${{ github.ref }}" -replace '^refs/tags/release/weekly/', ''
294+
echo "VERSION_DATE=$dateString" >> $env:GITHUB_ENV
296295
297296
- name: Restore dotnet tools
298297
run: dotnet tool restore

0 commit comments

Comments
 (0)