Skip to content

Github Action to upload a Godot 3.x and 4.x iOS game to Test Flight

License

Notifications You must be signed in to change notification settings

SlakkedisStudio/godot-ios-upload

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

godot-ios-upload

Github Action to export a Godot 3.x and 4.x game to iOS and upload it on App Store.
If you are facing problems with the action or this README feels incomplete, pull requests are welcome or open an issue.

Table of contents

Godot 4.x

Godot 4.x is the current active stable version and will be actively maintained. You can find the code in the main branch.

Requirements

  • Apple Developer Account
  • App-specific password
  • Godot Project with a iOS Export
  • Certificate and Provision Profile

Parameters

key required default description
project-name true Name used in xcodebuild
apple-id-username true Apple ID email
apple-id-password true App specific password
working-directory false . Path to .project file
godot-version false 4.2.1 Check versions here

How to use

Use the 4.x tag

- name: Export and upload to Testflight
  uses: dulvui/godot-ios-upload@v4
  with:
    project-name: FutsalManager
    provision-profile-path: ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision
    apple-id-username: ${{ secrets.IOS_APPLE_ID_USERNAME }}
    apple-id-password: ${{ secrets.IOS_APPLE_ID_PASSWORD }}

Godot 3.x

Godot 3.x is the current LTS version and will be less actively maintained. You can find the code in the godot-3 branch.

Parameters

key required default description
project-name true Name used in xcodebuild
apple-id-username true Apple ID email
apple-id-password true App specific password
working-directory false . Path to .project file
godot-version false 3.5.3 Check versions here

Working examples

You an find a working examples here:
https://github.com/dulvui/pocket-broomball/blob/main/.github/workflows/upload-ios.yml
https://github.com/dulvui/ball2box/blob/main/.github/workflows/upload-ios.yml

Parameters

key required default description
project-name true Name used in xcodebuild
apple-id-username true Apple ID email
apple-id-password true App specific password
working-directory false . Path to .project file
godot-version false 4.2.1 Check versions here

Working examples

You an find a working examples here:
https://github.com/dulvui/futsal-manager/blob/main/.github/workflows/upload-ios.yml

App-specific password

To upload the app you can use your account login credentials.
But for security reasons it is not recommended to do that, so prefer to use an app-specific password, by following this steps:

  1. Sign in to appleid.apple.com.
  2. In the Sign-In and Security section, select App-Specific Passwords.
  3. Select Generate an app-specific password or select the Add button, then follow the steps on your screen.
  4. Enter or paste the app-specific to the Action secrets.

Find here the official instructions on how to create an app-specific password: support.apple.com/en-us/HT204397

Note: An API key generated from appstoreconnect.apple.com/access/api site would also work, but is not implemented yet. Open an issue, if you need to use an API key and I'll implement it asap.

Certificate Request without a Mac

To upload a game to the App Store, you need to create a Developer Certificate. The official Apple guide shows you how to do it easily with a Mac device in its official documentation.

But it can be done also without a Mac, using a Linux System, following this guide of a Github user.

Here you can find the needed steps, but since this might change over time, please always check the comments of the guide above.

  1. Generate a private key and certificate signing request: Change "[email protected]" and "Simon Dalvai" with your values.
openssl genrsa -out distribution.key 2048
openssl req -new -key distribution.key -out distribution.csr -subj '/[email protected], CN=Simon Dalvai, C=IT'
  1. Upload CSR to apple at: https://developer.apple.com/account/ios/certificate/create Choose Production -> App Store and Ad Hoc
  2. Download the resulting distribution.cer, and convert it to .pem format:
openssl x509 -inform der -in distribution.cer -out distribution.pem
  1. Download Apple's Worldwide developer cert from portal and convert it to pem:
    https://www.apple.com/certificateauthority/ - Worldwide Developer Relations - G4 (Expiring 12/10/2030 00:00:00 UTC
openssl x509 -in AppleWWDRCAG4.cer -inform DER -out AppleWWDRCAG4.pem -outform PEM
  1. Convert your cert plus Apple's cert to p12 format (choose a password for the .p12):

Note: use -legacy if using opensssl v3.x https://stackoverflow.com/questions/70431528/mac-verification-failed-during-pkcs12-import-wrong-password-azure-devops

openssl pkcs12 -export -legacy -out distribution.p12 -inkey distribution.key -in distribution.pem -certfile AppleWWDRCAG4.pem 

Finally, update any provisioning profiles with the new cert, and download from dev portal. 6. Create base64 of distribution.p12 for github actions Now you can prepare it for the Github Action

base64 distribution.p12 -w 0 > distribution.base64
  1. Add distribution.base64 and the previous created p12 password to the Github Action secrets in your repository settings

Github Actions pricing

Github Actions are always free only for Open Source repositories. On private you get 2000 to 3000 run minutes per month, depending on the type of your account. Additionally, MacOS actions consume 10x times the minutes of a Linux machine, so you actually get 200 to 300 minutes per month.

Here the detailed documentation about pricing https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions

License

This software is licensed under the MIT license.

About

Github Action to upload a Godot 3.x and 4.x iOS game to Test Flight

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%