Support file upload for releases from when updating a release API
If you are currently not using GitLab for releases because files cannot be uploaded to releases, you days just got a lot simpler. We have introduced the ability for you to upload files to a release tag from the API, extending support of Release Assets to include files, rather than just asset links or source code.
Problem to solve
Users are looking for a way to connect outputs from pipelines to then release from the Releases page as an asset link. We have built the Package Registry as a place to store these binaries, and asset links are available to display assets on Releases. We are looking to extend the API so the binaries can be uploaded and stored on the release.
Gitlab has the useful release feature, which allows to upload files to releases / tags . Unfortunately the corresponding API functions do not include file upload .
From a backend perspective, a good way to do this is via https://gitlab.com/gitlab-org/gitlab-ce/issues/60630
The API functions
should have following additional parameters (compare create-new-file-in-repository):
file_name(optional) - Name of new file. Ex. release-v0.9.3.tar.gz
file_encoding(optional) - Change encoding to 'base64'. Default is text.
We're currently supporting the following two type of assets https://docs.gitlab.com/ee/user/project/releases/#release-assets
- Source code: state of the repo at the time of the Release
- Links: to content such as built binaries or documentation
We should support binary-type asset as well. We'll likely use GitLab Package Registry for that purpose.