A 20ga will work fine, but the 12ga is questionable for drilling and tapping, H&R won't and neither will most gunsmiths. If I wanted a scope rail on a 12ga, I'd drill and tap one hole 8-40 for a recoil stop, then use SuperWeld epoxy to permanently attach it. I dunno if you can silver solder aluminum to steel but Warne makes a steel rail that would work.
Tim