The best way is to use a relay. You've got two options.
Option 1: Wire the power wire from relay to the battery and connect the switched wire from the relay to your high beam wire. That way, when you flick on your high beams, your light bar turns on with your high beams.
Option 2: Wire the power wire from the relay to one of your Auxiliary switches (for example, let's say Aux 1) and wire the switched wire from the relay to your high beam wire. With this method, if your Aux 1 switch is on, when you flick on your high beams, your high beams and light bar will turn on. However, if Aux 1 is off and you flick on your headlights, only your high beam headlights will turn on. You can think of the Aux 1 wire as "arming" your light bar.