title: How to use GitLab Releases API?
body: <p>GitLab now has nice feature called "Releases". You can define "release" as combination of "tag + some description + some URLs" and it will be shown on "Releases" and "Tags" pages of your project. <a href="https://docs.gitlab.com/ee/user/project/releases/index.html" rel="noreferrer">GitLab doc</a> says: </p>
  
  <blockquote>
    <p>we recommend doing this as one of the last steps in your CI/CD release pipeline</p>
  </blockquote>
  
  <p>But, wait! CI/CD job by default has no access to API calls or write to git repository. We can configure "deploy token" or "deploy key" for access to repository and use them (via "secret variables") in build scripts. But neither "deploy token", nor "deploy key" give access to API.</p>
  
  <p>So, we can't create release from CI/CD job using its environment variables, we can't use deploy tokens, we can't use deploy keys. So, what exactly GitLab suggests us to do when it says: "we recommend doing this as one of the last steps in your CI/CD release pipeline" ?</p>