Animating a Held Item

So I’m creating an extendable glowstick kind of object where when I press a button it extends and when I push the button again it collapses. I’ve googled my heart out but I can’t make any sense of anything, any suggestions?


This is the model