Sure that is doable, but it doesn't quite sound like a OOB solution where you just add a flag to your YAML, or another line to your build-matrix and call it a day.
I've honestly missed this on Github Actions, and hadn't (yet) found a simple enough workaround to bother.