Include submodules into source packages of releases

692 views Asked by At

We have a repository which also has some small dependencies collected as submodules. To make it easier for users, I would like the source archives of releases to contain the sources of the submodules as well. If I create a release using gitlab, however, the submodules are only included as empty folders.

Is there a way to have the submodules included? Alternatively, is there a way that I can place my own source archives as part of the release and not have the ones generated by gitlab automatically?

1

There are 1 answers

3
MattBas On BEST ANSWER

You should be able to create a CI job that pulls submodules and packages them into a tarball. Then you can set that as an artifact, which can be downloaded from a URI in this form:

https://gitlab.com/<user>/<project>/-/jobs/artifacts/<branch|tag>/raw/<path to your tarbal>.tar.gz