Skip to content

Commit eb3487c

Browse files
committed
docs: Update README with clearer instructions and add images
1 parent 0cc8b61 commit eb3487c

14 files changed

Lines changed: 18 additions & 18 deletions

.github/workflows/package.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,31 @@ jobs:
1616
with:
1717
node-version: 20
1818
cache: npm
19+
1920
- name: npm install
2021
run: |
2122
npm install
2223
23-
- name: Package and Upload to S3
24+
# Use the `nick-fields/retry` (https://github.com/nick-fields/retry) to retry the command
25+
# in case the code signing fails due to network errors.
26+
- uses: nick-fields/retry@v2
27+
name: Package and Upload to S3
28+
with:
29+
timeout_minutes: 30
30+
max_attempts: 2
31+
command: npm run package:publish
2432
env:
2533
APPLE_ID: ${{ secrets.APPLE_ID }}
2634
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
2735
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
2836
CSC_LINK: ${{ secrets.CSC_LINK }}
2937
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
3038
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
31-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
32-
run: |
33-
npm run package:publish
34-
39+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
3540

3641
package-windows:
3742
timeout-minutes: 30
3843
runs-on: windows-latest
39-
4044
steps:
4145
- name: Check out Git repository
4246
uses: actions/checkout@v3
@@ -56,12 +60,11 @@ jobs:
5660
npm run package:publish
5761
env:
5862
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
59-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
63+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
6064

6165
package-linux:
6266
timeout-minutes: 30
6367
runs-on: ubuntu-latest
64-
6568
steps:
6669
- name: Check out Git repository
6770
uses: actions/checkout@v3
@@ -81,4 +84,4 @@ jobs:
8184
npm run package:publish
8285
env:
8386
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
84-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
87+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
![Apple Developer Program Subscription](https://raw.githubusercontent.com/omkarcloud/macos-code-signing-example/master/images/apple-developer-program.png)
1818

19-
*Apple Developer Program subscription page*
20-
2119
**2. Get Required Credentials**
2220

2321
*App Specific Password:*
@@ -255,9 +253,9 @@ certificate.p12
255253
*Your signed app is now ready for distribution*
256254

257255
### ❓ How to automate the above process using GitHub Actions?
258-
259256
**1. GitHub Repository Setup**
260257
1. Create a new repository.
258+
![new-repo-code-signing](https://raw.githubusercontent.com/omkarcloud/botasaurus/master/images/new-repo-code-signing.png)
261259
2. Push your code.
262260
3. Encode the certificate and save the output in a secure place:
263261
```bash
@@ -266,10 +264,12 @@ base64 -i certificate.p12
266264

267265
**2. Create an S3 Bucket**
268266
1. Open the AWS Console > S3.
267+
![aws-s3](https://raw.githubusercontent.com/omkarcloud/botasaurus/master/images/aws-s3.png)
269268
2. Click "Create bucket".
269+
![create-bucket](https://raw.githubusercontent.com/omkarcloud/botasaurus/master/images/create-bucket.png)
270270
3. Configure the bucket:
271271
```
272-
Bucket name: Enter a unique bucket name. Conventionally, this name matches your product's name in kebab case. For example, if your product is named "Chess Master," your bucket name will be `chess-master`.
272+
Bucket name: Enter a unique bucket name. Conventionally, this name matches your product's name in kebab case. For example, if your product's name is "Chess Master," your bucket name will be `chess-master`.
273273
Object Ownership: Select ACLs enabled
274274
Block Public Access settings for this bucket: Uncheck "Block all public access"
275275
```
@@ -281,11 +281,9 @@ Ensure that **Object Ownership** is set to **"ACLs enabled"** because Electron B
281281
![ACL Error](https://raw.githubusercontent.com/omkarcloud/macos-code-signing-example/master/images/acl-error.png)
282282

283283
4. Click on "Create bucket".
284-
285284
![S3 Bucket Creation](https://raw.githubusercontent.com/omkarcloud/macos-code-signing-example/master/images/s3-bucket-setup.png)
286-
*Creating an S3 bucket for app distribution*
287285

288-
5. If you don't have an AWS access key and secret key, get them.
286+
5. If you don't have an AWS access key and secret key, create them through the IAM service as described in [AWS documentation here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user_manage_add-key.html).
289287

290288
**3. Configure GitHub Secrets**
291289
In your GitHub Repository, navigate to Settings > Secrets and variables > Actions and add the following secrets:
@@ -300,7 +298,6 @@ AWS_SECRET_ACCESS_KEY # AWS secret key
300298
```
301299

302300
![GitHub Secrets](https://raw.githubusercontent.com/omkarcloud/macos-code-signing-example/master/images/github-secrets.png)
303-
*Adding secrets to your GitHub repository*
304301

305302
**4. Configure Electron Builder**
306303
1. In your "package.json" file, add the following to the Electron "build" configuration:
@@ -417,7 +414,7 @@ jobs:
417414
418415
419416
**6. Deploy**
420-
1. Push the code to GitHub repository.
417+
1. Push the code to your GitHub repository.
421418
2. Go to the repository's "Actions" tab to see the build process in action.
422419
![GitHub Actions Workflow](https://raw.githubusercontent.com/omkarcloud/macos-code-signing-example/master/images/github-actions.png)
423420
3. After a successful build, the installer files will be found in your S3 bucket. These files will be publicly accessible in the following format:

images/app-specific-password.jpg

349 KB
Loading

images/apple-developer-program.jpg

507 KB
Loading

images/aws-s3.png

374 KB
Loading

images/create-bucket.png

402 KB
Loading

images/export-certificate.jpg

834 KB
Loading

images/github-actions.jpg

766 KB
Loading

images/github-secrets.jpg

488 KB
Loading

images/new-repo-code-signing.png

274 KB
Loading

0 commit comments

Comments
 (0)