codemagic-ci-cd / cli-tools

Various utilities to managing Android and iOS app builds, code signing, and deployment.
https://codemagic.io/start/
GNU General Public License v3.0
243 stars 42 forks source link

Fix `app-store-connect publish` build lookup #352

Closed priitlatt closed 11 months ago

priitlatt commented 11 months ago

Resolves #346.

PR #340 added support to publish macOS applications to TestFlight and App Store using app-store-connect publish. To submit uploaded binary to either we first need to get the build reference in App Store Connect. The method which is responsible for build lookup only filtered the builds by application identifier and version, but it did not take application platform into account.

Consequently old(er) iOS build could have been found for a currently published macOS application (or vice versa) as long as both shared the same version string and build number.

To avoid such situations also filter the builds by platform and reverse order to have most recent uploads in the head of the returned builds list.

Updated actions