You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* GitHub CI/CD workflows to publish your library packages when creating a release (`.github/workflows/builds.yml`)
9
-
* GitHub CI/CD actions to build (`.github/actions/build/action.yml`) and to sign Mac frameworks (`.github/actions/build/sign.yml`).
9
+
* GitHub CI/CD actions to build the GDExtension (`.github/actions/build/action.yml`)
10
10
* preconfigured source files for C++ development of the GDExtension (`src/`)
11
11
* setup to automatically generate `.xml` files in a `doc_classes/` directory to be parsed by Godot as [GDExtension built-in documentation](https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_docs_system.html)
12
12
@@ -28,119 +28,3 @@ For getting started after cloning your own copy to your local machine, you shoul
28
28
29
29
This repository comes with a GitHub action that builds the GDExtension for cross-platform use. It triggers automatically for each pushed change. You can find and edit it in [builds.yml](.github/workflows/builds.yml).
30
30
After a workflow run is complete, you can find the file `godot-cpp-template.zip` on the `Actions` tab on GitHub.
31
-
32
-
Note: for macos, you will have to build the binary as a `.dylib` in a `EXTENSION-NAME.framework` folder. The framework folder should also have a `Resources` folder with a file called `Info.plist`. Without this file, signing will fail.
33
-
34
-
Note: for iOS, the same should be as for MacOS, however the `Info.plist` file needs to be close to the `.dylib`, instead of in a `Resources` folder (If this is not done, the build will fail to upload to the App Store).
Afterwards, you want to setin the `.gdextension` file the paths to the `.framework` folder, instead of the `.dylib` file (Note that for the `.dylib` binary, the extension is not needed, you could have a file without any extension and it would still work).
43
-
44
-
In the `name: Mac Sign` step, we are signing the generated mac binaries.
As you can see, this action requires some secrets to be configured in order to run. Also, you need to tell it the path to the `.framework` folder, where you have both the binary (`.dylib` file) and the `Resources` folder with the `Info.plist` file.
58
-
59
-
## Configuration - Mac Signing Secrets
60
-
61
-
In order to sign the Mac binary, you need to configure the following secrets:
62
-
`APPLE_CERT_BASE64`, `APPLE_CERT_PASSWORD`, `APPLE_DEV_PASSWORD`, `APPLE_DEV_ID`, `APPLE_DEV_TEAM_ID`, `APPLE_DEV_APP_ID`. These secrets are stored in the example above in the Github secrets for repositories. The names of the secrets have to match the names of the secrets you use for your action. For more on this, read the [Creating secrets for a repository](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) article from Github.
63
-
64
-
These secrets are then passed down to the `godotengine/godot-cpp-template/.github/actions/sign@main` action that signs the binary.
65
-
66
-
In order to configure these secrets, you will need:
67
-
68
-
- A Mac
69
-
- An Apple ID enrolled in Apple Developer Program (99 USD per year)
70
-
- A `Resources/Info.plist`in the `framework` folder. Take the one in this project as an example. Be careful to set CFBundleExecutable to the **EXACT** lib name, otherwise it won't work. Also, don't put strange names in the CFBundleName and other such places. Try to only use letters and spaces. Errors will be extremly vague if not impossible to debug.
71
-
72
-
For the actions you will need to set the following inputs. Store them as secrets in GitHub:
73
-
74
-
- APPLE_CERT_BASE64
75
-
- APPLE_CERT_PASSWORD
76
-
- APPLE_DEV_ID
77
-
- APPLE_DEV_TEAM_ID
78
-
- APPLE_DEV_PASSWORD
79
-
- APPLE_DEV_APP_ID
80
-
81
-
You will find here a guide on how to create all of them. Go to [developer.apple.com](developer.apple.com):
82
-
83
-
- Create an Apple ID if you don’t have one already.
84
-
- Use your Apple ID to register in the Apple Developer Program.
85
-
- Accept all agreements from the Apple Developer Page.
- Go to [developer.apple.com](https://developer.apple.com). Go to account.
96
-
- Go to membership details. Copy Team ID.
97
-
98
-
- APPLE_DEV_TEAM_ID = `1ABCD23EFG`
99
-
100
-
### APPLE_DEV_PASSWORD - Apple App-Specific Password
101
-
102
-
- Create [Apple App-Specific Password](https://support.apple.com/en-us/102654). Copy the password.
103
-
104
-
- APPLE_DEV_PASSWORD = `abcd-abcd-abcd-abcd`
105
-
106
-
### APPLE_CERT_BASE64 and APPLE_CERT_PASSWORD and APPLE_DEV_APP_ID
107
-
108
-
- Go to [developer.apple.com](https://developer.apple.com). Go to account.
109
-
- Go to certificates.
110
-
- Click on + at Certificates tab. Create Developer ID Application. Click Continue.
111
-
- Leave profile type as is. [Create a certificate signing request from a mac](https://developer.apple.com/help/account/create-certificates/create-a-certificate-signing-request). You can use your own name and email address. Save the file to disk. You will get a file called `CertificateSigningRequest.certSigningRequest`. Upload it to the Developer ID Application request. Click Continue.
112
-
- Download the certificate. You will get a file `developerID_application.cer`.
113
-
- On a Mac, right click and selectopen. Add it to the login keychain. In the Keychain Access app that opened, login Keychain tab, go to Keys, sort by date modified, expand your key (the key should have name you entered at common name `Common Name`), right click the expanded certificate, get info, and copy the text at Details -> Subject Name -> Common Name.
114
-
Eg.
115
-
- APPLE_DEV_APP_ID = `Developer ID Application: Common Name (1ABCD23EFG)`
116
-
117
-
- Then, selectthe certificate, right click and click export. At file format selectp12. When exporting, set a password for the certificate. This will be APPLE_CERT_PASSWORD. You will get a `Certificates.p12` file.
- Then you need to make a base64 file out of it, by running:
123
-
```
124
-
base64 -i Certificates.p12 -o Certificates.base64
125
-
```
126
-
127
-
- Copy the contents of the generated file:
128
-
Eg.
129
-
- `APPLE_CERT_BASE64` = `...`(A long text file)
130
-
131
-
After these secrets are obtained, all that remains is to set them in Github secrets and then use them in the Github action, eg. in the above Github action usage example, this part:
0 commit comments