fix(ci): use client_payload.version in desktop workflow#559
Open
mostronatorcoder[bot] wants to merge 1 commit intomainfrom
Open
fix(ci): use client_payload.version in desktop workflow#559mostronatorcoder[bot] wants to merge 1 commit intomainfrom
mostronatorcoder[bot] wants to merge 1 commit intomainfrom
Conversation
…atch When release.yml triggers the desktop build via repository_dispatch, it passes the correct version in client_payload.version. The desktop workflow was ignoring this and reading pubspec.yaml from main instead, which had the previous version at build time — causing desktop assets to be attached to the wrong GitHub Release. Both build-desktop and publish jobs now prefer client_payload.version when available, falling back to pubspec.yaml for manual workflow_dispatch.
Member
|
@coderabbitai review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When
release.ymltriggers the desktop build viarepository_dispatch, it passes the correct version inclient_payload.version. However, the desktop workflow was ignoring this and readingpubspec.yamlfrommaininstead — which still had the previous version at the time the build ran (the changelog PR with the version bump hadn't been merged yet).This caused desktop assets to be named with the wrong version and uploaded to the previous GitHub Release.
Confirmed on
v1.2.3: desktop workflow read1.2.2frompubspec.yamland attached assets tov1.2.2. The missing assets were manually recovered and uploaded.Fix
Both the
build-desktopandpublishjobs now useclient_payload.versionwhen triggered viarepository_dispatch. They fall back to readingpubspec.yamlfor manualworkflow_dispatchruns.Testing
Desktop assets for
v1.2.3were manually recovered from artifacts and attached to the release. This fix prevents the issue on all future releases.