ci: add a release job
Overview
This MR introduces a new GitLab CI job for releasing the CLI binary.
Creating a new token
For creating releases, I generated a project access token with api
scope (full access) and maintainer role. I added this token as GITLAB_TOKEN_RELEASE
protected variable to the CI Variables config. I tried to use developer
role, but it wasn't enough to create a release.
Related Issue
Related to #1014 (closed)
How Has This Been Tested?
- I've run the new release job on a tag https://gitlab.com/viktomas/cli/-/pipelines/565451038
- I've run the new release job on a normal branch https://gitlab.com/viktomas/cli/-/pipelines/565430144
- Running the new release job on a tag produces a GitLab release: https://gitlab.com/viktomas/cli/-/releases/v1.22.4
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms)
Edited by Tomas Vik