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.", "ref": "main"}' \
https://git.michlp.com/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. Pass ref (a branch, tag or commit) to create the tag at that commit when tag_name doesn't exist yet; an unresolvable ref fails with 422.

Viewing Releases

List every release in a project, ordered newest first:

curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://git.michlp.com/api/v4/projects/:id/releases

Or fetch a single release by its tag name:

curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://git.michlp.com/api/v4/projects/:id/releases/v1.0.0

Release Assets and Generic Packages

The Releases tab in the repository navigation lists every release with its notes and asset links, and lets writers create, edit and delete releases and links. To publish a binary, first upload the file as a generic package:

curl --header "PRIVATE-TOKEN: YOUR_TOKEN" \
  --upload-file ./codesync-linux-amd64 \
https://git.michlp.com/api/v4/projects/:id/packages/generic/codesync/1.2.0/codesync-linux-amd64

Uploaded files are stored in the instance's configured file storage (an S3-compatible bucket, or local disk), and the largest accepted file is set under Admin → Limits. Then create the release and attach the file with assets.links. The direct_asset_path gives the link a stable download address, and link_type is one of other, runbook, image or package:

curl -X POST -H "PRIVATE-TOKEN: YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tag_name": "v1.2.0", "assets": {"links": [{"name": "codesync-linux-amd64", "url": "https://HOST/api/v4/projects/ID/packages/generic/codesync/1.2.0/codesync-linux-amd64", "direct_asset_path": "/codesync-linux-amd64", "link_type": "package"}]}}' \
https://git.michlp.com/api/v4/projects/:id/releases

The file can then be downloaded from a URL that does not change:

https://git.michlp.com/<namespace>/<repo>/-/releases/<tag>/downloads/<path>
https://git.michlp.com/<namespace>/<repo>/-/releases/permalink/latest/downloads/<path>

The second form always resolves to the newest release whose released_at is not in the future, so install scripts can fetch the latest build without knowing its version. In a private repository, readers download through the first form while signed in to the web UI, and scripts use the API form /api/v4/projects/:id/releases/<tag>/downloads/<path> with a token. A link to one of this instance's generic package files is served directly, with the reader's access to that package's project; any other link redirects to its URL.

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.michlp.com/api/v4/projects/:id/releases/v1.0.0