Er... I am not sure how this is possible. But if a gun fires only when the trigger is released, that means you've had to pull the trigger down and trigger the firing mechanism within the gun without it firing. If you can do that,, then the gun is broken and won't fire anyways.
This is especially true of semi-automatic pistols where it's dual action. (Can fire without pulling the slide back on a fresh magazine. But it's requires more force.)