swift-actions / setup-swift

GitHub Action that setup a Swift environment
MIT License
255 stars 49 forks source link

Gather Swift version from the `.swift-version` file #633

Open wojexe opened 9 months ago

wojexe commented 9 months ago

Is your feature request related to a problem? Please describe. I have looked searched for automatic deduction of the required Swift version in the codebase but there is no such feature. For example: setup-node GH Action has this feature built in - you can specify the node-version-file in the config.

Describe the solution you'd like I would like to see automatic deduction of the Swift version if there is a .swift-version file in the root directory IF POSSIBLE. Otherwise it would be also good to have an option to specify the Swift version from a file, just like in the setup-node package.

I might look into this when I have some spare time :)

fwal commented 9 months ago

Hi! Good suggestion!

This is actually something I made a note of years ago (in #50) but didn't seem to be much need for it at the time 😅.

I also thought of supporting reading from the package manifest at the time.

Should be pretty easy to achieve though if you'd like to give it a go! 🙂