Open
Description
GitLab CI injects CI_JOB_TOKEN
to allow a pipeline job to access a project resource through public v4 API. Not all of APIs support job token auth, however, release creation API is already supported. So in theory, executing GITLAB_TOKEN=$CI_JOB_TOKEN
should be suffice to run semantic-release.
However, as I tested https://gitlab.com/dosuken123/semantic-release-test/-/jobs/628942282, it didn't succeed as semantic-release tried remote Git repository authentication. I'm not sure why it's necessary as the tag creation is done via the above API call.
If CI_JOB_TOKEN
auth is possible, it's very convenient to run semantic-release in GitLab CI as users don't need to create PAT.