Hi! @martin_alley
You can achieve this by following multiple ways.
1. Add your code in the local branch of Magento cloud. Then upload local branch to you beta and then master branch.
2. add your extension in the git repo. then connect to Magento cloud by the server. then add your extension by cloning git.
3. add your extension in the git repo. then connect to Magento cloud by the server. then install with the composer.