You can do so one of two ways:
You can right-click on the action and select "save as shared action". If you do this, it will prompt you to provide a file path for this shared action. The other, and preferred way, is to use a project and simply drag and drop the action from the diagram onto a node in the project tree. This will replace the current action in the diagram with a shared action.