Restore Labs-specific version date formatting

This commit is contained in:
Arlo Godfrey 2024-08-01 16:16:29 -05:00 коммит произвёл Arlo
Родитель d9df36d8ea
Коммит 75af040238
1 изменённых файлов: 2 добавлений и 11 удалений

13
.github/workflows/build.yml поставляемый
Просмотреть файл

@ -234,19 +234,10 @@ jobs:
with:
submodules: recursive
# Semver regex: https://regex101.com/r/Ly7O1x/3/
- name: Format Date/Time of Release Package Version
if: ${{ env.IS_RELEASE == 'true' }}
run: |
$ref = "${{ github.ref }}"
$ref -match "^refs/heads/rel/(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$"
echo "VERSION_DATE=$($matches['patch'])" >> $env:GITHUB_ENV
echo "VERSION_PROPERTY=$($matches['prerelease'])" >> $env:GITHUB_ENV
- name: Format Date/Time of Commit for Package Version
if: ${{ env.IS_RELEASE == 'false' }}
run: |
echo "VERSION_DATE=$(git log -1 --format=%cd --date=format:%y%m%d)" >> $env:GITHUB_ENV
- name: Restore dotnet tools
run: dotnet tool restore
@ -260,7 +251,7 @@ jobs:
--skip androidemulator
--skip vswinworkloads
--verbose
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with: