Skip to content

Commit 9fd2fb9

Browse files
committed
Fix version format for weekly release tags
Weekly release tags (refs/tags/release/weekly/*) were falling through to pull request version format, producing malformed package versions like '0.1.250929-pull-.2302' instead of '0.1.250929-build.2302'. Added startsWith(github.ref, 'refs/tags/release/') to VERSION_PROPERTY condition so release tags use build.RUNNUMBER format like main branch. Fixes version suffix for both build and package jobs. Evidence: Run 18109399189 artifacts showed all packages with 'pull-.' instead of 'build.' format.
1 parent 5438e4d commit 9fd2fb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282

8383
env:
8484
MULTI_TARGET_DIRECTORY: tooling/MultiTarget
85-
VERSION_PROPERTY: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/')) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
85+
VERSION_PROPERTY: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/') || startsWith(github.ref, 'refs/tags/release/')) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
8686

8787
# Steps represent a sequence of tasks that will be executed as part of the job
8888
steps:
@@ -266,7 +266,7 @@ jobs:
266266
winui: [0, 2, 3]
267267

268268
env:
269-
VERSION_PROPERTY: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/')) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
269+
VERSION_PROPERTY: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/') || startsWith(github.ref, 'refs/tags/release/')) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
270270

271271
steps:
272272
- name: Install .NET SDK v${{ env.DOTNET_VERSION }}

0 commit comments

Comments
 (0)