There are cases where apps need to be built on different OS versions, this happens for us for macOS. The electron app needs to be build for HighSierra to keep compatibility to as many as possible OSX versions. Our IOS app however needs to be build on the latest version.
Currently the exec runner only allows to define the os and arch (see Platform | Drone).
The docker runner allows to set the OS version on windows runners, see Platform | Drone
Sorry, I never documented this behavior because I did not anticipate anyone needing it, however, it is possible. First you need to set the following environment variable [1] in your runner configuration: