is there a recipe to achieve the following:
- Create Changelog for tag✅
- Tag the commit✅
- push + start pipeline
- build artifacts
- add artifact and parts of the changelog to the tag and convert it into a release without having an users api key in ci
I found the release api, but the fact, that i have to put an api key of a user into an env var scares me, as gitlab knows who triggered the build and alteady provides other tokens.
So basicly we have that:
curl --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: gDybLx3yrUK_HLp3qPjS" \
--data '{ "name": "New release", "tag_name": "v0.3", "description": "Super nice release", "milestones": ["v1.0", "v1.0-rc"], "assets": { "links": [{ "name": "hoge", "url": "https://google.com", "filepath": "/binaries/linux-amd64" }] } }' \
--request POST https://gitlab.example.com/api/v4/projects/24/releases
The problem is, that i would expect the private token to be one of the tokens provided by the CI Env.
What might work is to add a future release with our local release preparation workflow and then push the tag to really do the release.
But this might break the asset creation i mentioned earlier, as i would expect to build the assets during CI