GitLab Releases 🦊
Rlsr can publish releases directly to GitLab by configuring the gitlab target in your release configuration.
Configure the GitLab Target
Section titled “Configure the GitLab Target”Add a gitlab entry under targets:
targets: gitlab: owner: "namespace" # or username repo: "project-name" url: "https://gitlab.com" # optional, defaults to gitlab.comowner: The GitLab group/namespace or username that owns the project.repo: The GitLab project name.url: The GitLab instance URL (optional, defaults tohttps://gitlab.com). Use this for self-hosted GitLab instances.
Authentication
Section titled “Authentication”Set the GITLAB_TOKEN environment variable with a GitLab Personal Access Token that has the api scope. Rlsr uses this token to create releases and upload assets.
Example Configuration
Section titled “Example Configuration”releases: - name: "Release to GitLab" dist_folder: "./dist" targets: gitlab: owner: "namespace" repo: "project-name" builds: - command: "cargo build --release" artifact: "./target/release/app" archive_name: "app-{{ meta.tag }}-linux-x86_64" archive_format: tar_gzSelf-Hosted GitLab
Section titled “Self-Hosted GitLab”For self-hosted GitLab instances, specify the url field:
targets: gitlab: owner: "myteam" repo: "myproject" url: "https://gitlab.example.com"Asset Handling
Section titled “Asset Handling”Build artifacts are uploaded as GitLab generic packages and then attached to the release as asset links. The release page will link to the package files stored in the GitLab Package Registry.