Adding an assets-link with a maven package to a release?

Linking a release to a maven package

I can publish Maven packages to the gitlab package registry by configuring gradle correspondingly and executing gradle publish in a job in my .gitlab-ci.yml

I can create a release for my project with the release-cli command in a job in my .gitlab-ci.yml

Those two things work, using the CI_PIPELINE_IID as a version id for the maven package:

   - publish    
   - release
     stage: publish
     image: gradle:latest
         - tags
         - pwd
         - cd helloworld
         - sed -i "s/VERSION/${CI_PIPELINE_IID}/g" build.gradle 
         - gradle publish
     stage: release
     when: manual
         - tags
         - release-cli create --name release-branch-$CI_JOB_ID --description "release-branch-$CI_COMMIT_REF_NAME-$CI_JOB_ID added comment on certificate" --tag-name job-$CI_JOB_ID --ref $CI_COMMIT_SHA 

But how can I create a link in the release that points to that particular maven package in the package registry?

Or, in other words, how can I determine the link to the package published in publish-package so I can add it with an --asserts-link to the release created in the release-branch job?

Or, alternatively, is there another way to accomplish what I want?

Gitlab version is 13.5.3, self-managed, starter.

Thank you for your help,