You can do it either way BUT, just make sure you don't get stain where the glue needs to go AND don't get glue where you want the stain.
You can cover the glue joints with blue tape and then be able to stain every surface first. Then remove the tape when it is glue time.
Or you can cover the stain areas right next to where the glue goes and do your glue up and NOT get it where the stain will go.
It seems that glue doesn't like to stick to any painted, oiled or stained surface. And likewise stain especially wont cover glue in the pores of wood.
Hope that gives you some ideas.