Support use of PRIVATE-TOKEN to create releases using the CLI
Release Notes
In this milestone, we added the ability to use the release-cli with a PRIVATE-TOKEN as defined in Create a release API documentation. This enables overriding the user that creates a release to support automation by allowing connection of a project level PRIVATE-TOKEN or using a bot user account's PRIVATE-TOKEN.
Further details
The following discussion from !5 (merged) should be addressed:
-
@sean_carroll started a discussion: (+1 comment) @jaime in this case would we be passing
PRIVATE-TOKENvia the command line?
Support using the release-cli outside of the GitLab CI environment
In #9 (closed) we decided that the release-cli will support creating releases using the JOB-TOKEN read from CI_JOB_TOKEN (see CI Environment Variables). This means that the CLI can only be used inside GitLab's CI environment.
We should allow users to use the release-cli with a PRIVATE-TOKEN as defined in Create a release API documentation.
Options
Some options are
-
separate the -tokenoption into-job-tokenand-private-token(would break compatibility if !6 (merged) gets merged first) or - [-] add a boolean option like
-ci, when set then let the code decide if we setPRIVATE-TOKENorJOB-TOKEN. So if-ci=truedefault token value toCI_JOB_TOKENread from the env vars
Implementation
- Add support for
-private-token!32 (merged)