Create annotated tags with Releases API
Release notes
Previously, you were only able to create lightweight tags when using the Releases API to create a release. With this update, you can now add an optional tag_message
parameter to create an annotated tag when creating a release. This enables you to include relevant information along with the new tag so downstream users and application can have additional context.
Problem to solve
It is now possible to create automated releases from CI jobs, because the CI_JOB_TOKEN
gives access to the Releases POST API, either manually (&2510 (comment 278101632)) or with the release
job parameter (https://docs.gitlab.com/ee/ci/yaml/#release).
However, although one can create a tag with this, it looks like only lightweight tags are allowed. It doesn't seem to be possible to create annotated tags from CI jobs.
User experience goal
If a CI job can create a tag and a release, why can't it create an annotated tag?
Proposal
- Add an argument
message
to the Create Release API, to create an annotated tag. If a tag can be created by releasing, it could be annotated too.
Further details
Some applications rely on annotated tags. For example by default git describe
looks for annotated tags and not lightweight ones.
Permissions and Security
-
Maintainer (40) members should be able to create annotated tags with the Release API -
Owner (50) members should be able to create annotated tags with the Release API