How can I create an installer for my game? (Mac)

I’m able to build a Mac Version of my game, but I encounter a problem when I put it in a zip folder. It seems that when Mac users unzip the program using Finder, they’re unable to run it at all. This can only be circumvented by using a different extractor, or by using chmod to change the permissions. Neither of these options are ideal since it would just be really cumbersome to expect every Mac user to do that.

So in regards to that, I wanted to see if I could package the .app into an installer that the user could run, which would hopefully solve the problem of the game not opening. Does anyone have a guide for how I could accomplish this?

You can transform the .app folder into a .dmg file with the disk utility of macos. Create a new folder with only your .app inside. Then in disk utility clic on “File/New image/From folder” and choose your folder. MacOS will generate a .dmg for you.
However there will still be a warning that the source of the software is not reliable and you will have to right click “open” to bypass the warning to launch the app.

How do you get rid of the warning ?

The only way to get rid of the warning is to get it onto the App store. That way, Apple will certify the app and will disable the warning: Submit your apps to the Mac App Store - Apple Developer