Releases
A release marks a specific git tag as a published version of your project. Each release records a tag_name, an optional display name, a
description
(release
notes), a released_at
timestamp, and the author who created it.
Releases and Tags
Releases are built on top of git tags. A release points at a tag by its tag_name, and
each tag can have at most one release. Browse your repository's tags under Code → Tags; tag a commit before creating the release that references it.
Creating a Release
Releases are managed through the GitLab-compatible REST API. Send a POST to the
project's releases endpoint with the tag name and, optionally, a name and description:
curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"tag_name": "v1.0.0", "name": "Version 1.0.0", "description": "First stable release."}' \
https://#git.vianet.us/api/v4/projects/:id/releases
If you omit name, the tag name is used as the release name. The
released_at
timestamp is set to the time of creation, and the authenticated user is recorded as the author.
Tag names must be unique per project — creating a second release for the same tag fails.
Viewing Releases
List every release in a project, ordered newest first:
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://#git.vianet.us/api/v4/projects/:id/releases
Or fetch a single release by its tag name:
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://#git.vianet.us/api/v4/projects/:id/releases/v1.0.0
Deleting a Release
Delete a release by its tag name. This removes the release record only — the underlying git tag is left untouched:
curl -X DELETE -H "Authorization: Bearer YOUR_TOKEN" \
https://#git.vianet.us/api/v4/projects/:id/releases/v1.0.0