Skip to content

Conversation

Arlodotexe
Copy link
Member

Problem

Weekly release packages have malformed version suffixes due to incorrect VERSION_PROPERTY logic in the build workflow.

Example from run 18109399189 (Sept 29, 2025):

  • Actual: CommunityToolkit.Labs.WinUI.Controls.Shimmer.0.1.250929-pull-.2302.nupkg
  • Expected: CommunityToolkit.Labs.WinUI.Controls.Shimmer.0.1.250929-build.2302.nupkg

All 12 packages in the Sept 29 weekly release run had the malformed pull-.RUNNUMBER suffix instead of the correct build.RUNNUMBER format.

Root Cause

The VERSION_PROPERTY environment variable in build.yml uses conditional logic to determine version suffix format:

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) }}

This condition checks:

  • If main or rel/* branch → use build.RUNNUMBER
  • Otherwise → use pull-PRNUMBER.RUNNUMBER

Weekly release tags have refs like refs/tags/release/weekly/250929, which don't match either condition, so they fall through to the pull request format. Since github.event.number is null for tag pushes, the result is pull-.RUNNUMBER.

Solution

Add tag detection to the condition so release tags use the same format as main branch builds:

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) }}

This change is applied in both the build job (line 85) and package job (line 269) to ensure consistent version formatting throughout the workflow.

Testing

This fix can be validated:

  1. Next automated weekly release: Wednesday, October 8, 2025 scheduled run
  2. Manual testing: Trigger the scheduled-releases workflow manually via Actions UI
  3. Expected result: Package names should have build.RUNNUMBER suffix instead of pull-.RUNNUMBER

Related

Evidence

Downloaded artifacts from run 18109399189 confirmed all packages had malformed version suffix. Example packages affected: CanvasLayout, CanvasView, DataTable, MarkdownTextBlock, Marquee, OpacityMaskView, Shimmer, TitleBar, TokenView, DependencyPropertyGenerator, RivePlayer, TransitionHelper.

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.
@Arlodotexe Arlodotexe enabled auto-merge October 8, 2025 05:52
@Arlodotexe Arlodotexe merged commit dd483fc into main Oct 8, 2025
24 checks passed
@michael-hawker
Copy link
Member

One thing we could consider is to detect the event number variable if that's only used on PRs to use the PR tag and use build for anything else maybe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants