Generating automatic release notes in gitlab, for new releases

i would like to generate automatic release notes in gitlab, when a new release has been added in tags without writing release notes on my own.
can anyone help me in clear steps, as i have searched for solutions in the internet and
i have found this git lab repository and python code.

But, as fresher i do not know how to implement it in CI pipeline or configuration file i.e. .gitlab-ci.yml.

I would like to achieve that in the CI pipeline, should run the following python script. when triggered by creating new release using tags in git lab.

What i meant is, as soon as a new release is created it should trigger this .gitlab-ci.yml (in which python script is placed) to produce release notes.

Kindly, please let me know in detail procedure

Thank you