Continuing from GameCI 2, let’s examine the Build with Linux job matrix, along with the Deploy to the Google Play Store and Deploy to the Web via GitHub Pages jobs.
Build with Linux
We would ideally run all builds on Linux, but there are some constraints that mean we are only able to run a subset of our target builds on Linux.
The eligible target platforms are Android, iOS, StandaloneLinux64, and WebGL.
Make sure to have read the GameCI GitHub docs before examining this job matrix.
Most of this job matrix should be self-explanatory after reading the GameCI Builder docs, but you can find some additional details for each target platform below.
Android
A common issue with Android builds on the GitHub runners is running out of disk space.
The Free Disk Space for Android step attempts to free up some space to hopefully prevent this issue, but if you have a larger project, you may need to do further work to avoid this issue:
For additional details about Android builds and deployment, refer to the GameCI Android docs.
iOS
Building for iOS is a 2-stage process: This Build with Linux job is the first stage, but the second stage requires a macOS runner.
This job generates an Xcode project, which is uploaded as an artifact to be used in GameCI 4: Build and Deploy with MacOS.
For additional details about iOS builds and deployment, refer to the GameCI iOS docs.
StandaloneLinux64
The Linux executable can be deployed via Steam (see GameCI 6: Conclusion), but the Zip Build and Upload Zip to GitHub Release steps also enable players to get the build from the GitHub Releases page.
Note that the Upload Zip to GitHub Release step requires a Personal Access Token.
WebGL
WebGL builds simply create files which need to be hosted on a web server.
See the Deploy to the Web via GitHub Pages job below.
Deploy to the Google Play Store
As mentioned earlier, the GameCI Android docs is the best resource for Android builds and deployment.
An additional detail about this job is that it only runs when triggered by either a GitHub Release or a workflow dispatch with release Android as the input.
Also note that we use fastlane/metadata/android/en-US/changelogs/default.txt to publish the release notes.
Deploy to the Web via GitHub Pages
This job only runs when triggered by either a GitHub Release or a workflow dispatch with release WebGL as the input.
All this job does is copy the WebGL artifact to the correct location in the /docs folder of GitHub Pages.
Once copied, simply committing the files will trigger a GitHub Pages deployment.
Note that this web page relies on custom html in the form of cgs-WebGL.html, though work remains to make this web page look and feel nicer.