There are ways to do that, really depends on the exact radios you are using.
If the amateur radio is only VHF, then you can use a diplexer to split out the antenna feed to a VHF side and a UHF side. Run a jumper cable to the appropriate radio and you're all set.
If the amateur radio is a dual band (2 meter/70 centimeter), then the diplexer won't work as it will not separate out the UHF band like that.
If you are trying to do this with one antenna, then a switch may be an option.
Best option is to use dedicated antennas for both radios. Use a good UHF commercial antenna for your GMRS radio and a suitable dual band amateur radio antenna for your dual band amateur radio. Just make sure you have sufficient spacing between the two antennas.