How to create OS specific composite action

Hi… I want to create a composite action which would be common for all platforms…
I know that I can use if inside run, but I need cmd shell on Windows and bash in the rest… is it possible? Because it looks that if in the step is not accepted :-/