Skip to content

Commit 75af040

Browse files
committed
Restore Labs-specific version date formatting
1 parent d9df36d commit 75af040

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -234,19 +234,10 @@ jobs:
234234
with:
235235
submodules: recursive
236236

237-
# Semver regex: https://regex101.com/r/Ly7O1x/3/
238-
- name: Format Date/Time of Release Package Version
239-
if: ${{ env.IS_RELEASE == 'true' }}
240-
run: |
241-
$ref = "${{ github.ref }}"
242-
$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-]+)*))?$"
243-
echo "VERSION_DATE=$($matches['patch'])" >> $env:GITHUB_ENV
244-
echo "VERSION_PROPERTY=$($matches['prerelease'])" >> $env:GITHUB_ENV
245-
246237
- name: Format Date/Time of Commit for Package Version
247-
if: ${{ env.IS_RELEASE == 'false' }}
248238
run: |
249239
echo "VERSION_DATE=$(git log -1 --format=%cd --date=format:%y%m%d)" >> $env:GITHUB_ENV
240+
250241
- name: Restore dotnet tools
251242
run: dotnet tool restore
252243

@@ -260,7 +251,7 @@ jobs:
260251
--skip androidemulator
261252
--skip vswinworkloads
262253
--verbose
263-
254+
264255
- name: Add msbuild to PATH
265256
uses: microsoft/setup-msbuild@v2
266257
with:

0 commit comments

Comments
 (0)