Saves artifact under name in the current session, records the new version in actions' artifactDelta, and returns the saved version number.
artifactDelta
if the invocation has no artifact service configured.