How to add a button to the actions?


I want to add a button at a given position to the actions dropdown of Jira. On click it should simply call something like console.log("Hello world"). How can I do this?

I tried, but it seems to require a modal, which is not what I want.