maxim-lobanov / setup-xcode

Set up your GitHub Actions workflow with a specific version of Xcode
MIT License
280 stars 28 forks source link

Version 15.4.0 cannot be set #81

Open stoyicker opened 4 months ago

stoyicker commented 4 months ago

Recently Xcode 15.4 is available on macos-14-xlarge. However, this action fails to set said version when requested.

See https://github.com/tidal-music/network-time/actions/runs/8920367449/job/24498870117

maxim-lobanov commented 4 months ago

Hi,

GitHub runners has Xcode 15.4.0 beta installed. Could you please try to use xcode-version: '15.4-beta'

stoyicker commented 4 months ago

The version used is parsed by using PlistBuddy to retrieve CFBundleShortVersionString from the Info.plist from each XCode installation, so manual adjustments aren't really feasible I'm afraid.

Given that the table of versions printed upon the failure is capable from separating version from releaseType, would it please be possible to have this action resolve releaseType automatically?

davidmigloz commented 4 months ago

@maxim-lobanov 15.4-beta doesn't seem to work (I tried 15.4.0 and 15.4 as well)

image
maxim-lobanov commented 4 months ago

Given that the table of versions printed upon the failure is capable from separating version from releaseType, would it please be possible to have this action resolve releaseType automatically?

I am not sure that it will work well. Imagine that image contains the following versions of Xcode: 15.7, 15.8, 15.9 (beta). When customer types xcode-version: 15, they expect to get 15.8 (latest stable). The proposed logic will return 15.9 (beta). So -beta postfix is used to query across beta versions. xcode-version: 15 selects 15.8 and xcode-version: 15-beta selects 15.9 (beta)

@maxim-lobanov 15.4-beta doesn't seem to work (I tried 15.4.0 and 15.4 as well)

@davidmigloz , You probably want to use just xcode-version: 15.4 without -beta postfix because GitHub Actions team updated images recently and images contain stable version of Xcode 15.4. It is seen from table on screenshot (stable: true)

davidmigloz commented 4 months ago

ahh it seems some runners have 15.4.0 marked as stable and others still have it as beta.

In one run I got:

image

In a later run I got:

image
stoyicker commented 4 months ago

Given that the table of versions printed upon the failure is capable from separating version from releaseType, would it please be possible to have this action resolve releaseType automatically?

I am not sure that it will work well. Imagine that image contains the following versions of Xcode: 15.7, 15.8, 15.9 (beta). When customer types xcode-version: 15, they expect to get 15.8 (latest stable). The proposed logic will return 15.9 (beta). So -beta postfix is used to query across beta versions. xcode-version: 15 selects 15.8 and xcode-version: 15-beta selects 15.9 (beta)

Sounds like this could be solved by splitting the releaseType selection into a separate parameter away from a postfix to xcode-version no? So:

xcode-version: 15 xcode-releasetype: Beta

results in 15.4 while

xcode-version: 15 xcode-releasetype: GM

results in 15.3, presuming they're both executed in a runner where 15.4 is marked as beta.