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
Copy file name to clipboardexpand all lines: README.md
+41-4
Original file line number
Diff line number
Diff line change
@@ -149,16 +149,53 @@ Following the `electron-log` defaults, logs are written to the following locatio
149
149
150
150
## Deploy and Publish
151
151
152
-
**Note**: MacOS can compile the desktop application for every other platforms. Windows OS can only compile Windows executable files.
153
-
154
152
### Requirements
155
153
156
154
- You should try to update all dependencies, particularly any dependencies related to `electron` and `electron-builder` as this dependency will create the executable files for every OS.
157
-
- Make sure your `.env` and `.env.test` files contain the correct values. Use your own github token `GH_TOKEN` in order to release the new version with your github account.
155
+
- Make sure your `.env` and `.env.test` files contain the correct values. Use your own github token `GH_TOKEN` in order to release the new version with your github account. If you are using the Github Actions, make sure the sensitive data are reported to Github's `Secrets` and are input in the corresponding workflow.
158
156
-**Sign Apple executable files**: In order to sign the application and publish it on the mac store, you will need a corresponding **Developer ID** certificate installed on your apple computer. You need to be part of the apple developer team on the [Apple Developers Website](https://developer.apple.com/) as well as use the certificate containing the private key. [Here](https://help.apple.com/xcode/mac/current/#/dev154b28f09) you can find some indications to help you install this certificate. Once added to _Xcode_ (the should also be available in _My Certificates_ in Keychain), this certificate will be automatically be used during the creation of the executable files. You will also need the `assets/embedded.provisionprofile` file.
159
157
This command will tell you if your app was correctly signed: `codesign --display --verbose=2 dist/mac/Graasp.app`
160
158
161
-
### Steps
159
+
**Note**: MacOS can compile the desktop application for every other platforms. Windows OS can only compile Windows executable files.
160
+
161
+
### Github Actions Release
162
+
163
+
The whole process is handled in Github Actions, which is triggered for each push in a tag release. The next section will go through the steps for setting up this workflow, while the following sections will describe how to deploy and publish manually.
164
+
165
+
The workflow publishing the release on github is located at `.github/workflows/release.yml`. This workflow uses an [electron-builder action](https://github.com/samuelmeuli/action-electron-builder) which generates a release draft. Each platform (Windows, MacOS and Linux) generates its own executable to be added to the corresponding release.
166
+
167
+
The workflow takes as environment variable:
168
+
169
+
- the Application Developer ID certificate (to sign mac executables)
170
+
- the certificate password
171
+
- the provision profile passphrase
172
+
- other necessary environment variables such endpoints, google api key, etc...
173
+
174
+
#### Environment Variables
175
+
176
+
Github Actions uses environment variables as `secrets`. These are set in `Settings → Secrets`, and then reported in the workflow under `env` with the following syntax:
1. Export the necessary certificates as one file (eg `certs.p12`). This will ask for a password.
188
+
2. Run `base64 -i certs.p12 -o encoded.txt`
189
+
3. In your project's GitHub repository, go to `Settings → Secrets` and add the following two variables:
190
+
191
+
-`MAC_CERTS`: Your encoded certificates, i.e. the content of the encoded.txt file you created before
192
+
-`MAC_CERTS_PASSWORD`: The password you set when exporting the certificates
193
+
194
+
4. The `embedded.provisionprofile` needs to be encrypted with gpg. Run `gpg -c embedded.provisionprofile`. Enter a password to validate the encryption.
195
+
5. A new `embedded.provisionprofile.gpg` should have been created. This file should be pushed in the repo in `assets`.
196
+
6. The password used to encrypt the file should be added to `secrets` as `PROVISION_PROFILE_PASSPHRASE`
197
+
198
+
### Manual Release Steps
162
199
163
200
1. Run `yarn dist`. This command will first build the repository and compile it into multiple executable files. All the configuration is set in `package.json`.
0 commit comments