How to setup GitHub Action to run tests only once per OS but run packaging in parallel

Is it possible to have with GitHub Action a setup where for example for Linux, I build and run tests only once, when that succeeds, start one build per packaging (rpm, deb, AppImage for example) and those three run in parallel? I’m trying to avoid wasting resources by running the same tests three time but I also don’t want a failure in the rpm packaging to prevent releasing the deb and AppImage.