It's macOS specific and depends on pre-rendered icon in png format, but it makes it easy to re-generate .icns file in the future.