Adding tags in the release dynamically

You create a Jython script task utilizing Jython API to add tags.
For example

tag="APPLE,IOS,MAC"
current_release= getCurrentRelease()
current_release.setTags(tag.split(","))
releaseApi.updateRelease(current_release.id, current_release)

This will add the tags to the current release.
REF-DOC:https://docs.xebialabs.com/jython-docs/#!/xl-release/9.7.x//service/com.xebialabs.xlrelease.api.v1.ReleaseApi#ReleaseApi-updateRelease-Release