Never with another person. In my teens I used to jack off in the woods on our property. Not very daring, as I would have heard if anyone was approaching (dried leaves, twigs, etc. all over the ground would have alerted me).
Once in my senior year at high school I jacked off in the locker room at school. My locker was at the back, but if someone had been quiet enough coming in I could have been caught in the act.
The only thing I have done in public with another person was serious making out. Lots of times. The funniest was when I was in the Navy. A friend of mine insisted that her husband make out with me on the hood of their car in front of the big front window of our favorite bar (a straight bar, frequented by lots of guys from my ship). I went along with it, not realizing that I had such a huge audience until the next day on the ship. My friend's husband was in the Navy, too, but he was very well liked by everybody, so no one made any trouble over it. He wasn't gay or bi, but he was perfectly fine with kissing a guy if it turned his wife on!