Upload Core Desktop model to the store

Ubuntu Core uploads its model directly to the store, allowing the ISO build pipeline to just download it during building. It is done here:

https://git.launchpad.net/livecd-rootfs/tree/live-build/ubuntu-core-installer/hooks/05-prepare-image.binary#n34

How can we, the Ubuntu Core Desktop, upload our model to be able to do the same?

Thanks.