Skip to content

Commit 212242f

Browse files
committed
fix: integrate explain for sertvice account creation + add sale info for our service
1 parent d37860b commit 212242f

8 files changed

+292
-219
lines changed
25.6 KB
Loading
55.5 KB
Loading

src/content/blog/en/automatic-capacitor-android-build-github-action.md

Lines changed: 124 additions & 186 deletions
Large diffs are not rendered by default.

src/content/blog/en/automatic-capacitor-android-build-gitlab.md

Lines changed: 69 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,43 @@ locale: en
1818
next_blog: null
1919
---
2020

21+
# Automatic Android Builds with GitLab CI
22+
23+
Setting up CI/CD for Capacitor apps can be complex and time-consuming. Here's what you need to know:
24+
2125
## Prerequisites
2226

23-
Before continuing with the tutorial…
27+
Before starting, you'll need to set up:
28+
29+
- A GitLab account with admin access
30+
- Your app already published on Google Play Store with proper signing
31+
- Android signing key and keystore files
32+
- Google Cloud Console project with Play Store API enabled
33+
- Service account with proper permissions
34+
- Understanding of GitLab CI/CD workflows
35+
- Knowledge of Fastlane configuration
36+
- Time to maintain and debug the pipeline
37+
38+
## Professional CI/CD Setup by Capgo
39+
40+
Skip the complexity. [Capgo](https://capgo.app/ci-cd/) configures your CI/CD pipeline directly in your preferred platform:
41+
42+
- **Platform Independence**: Works with GitHub Actions, GitLab CI, or others
43+
- **Seamless Integration**: No platform switch needed, works with your current process
44+
- **Tailored Configuration**: Customized setup matching your project needs
45+
- **Expert Guidance**: We've already set up CI/CD for 50+ apps
2446

25-
- Make sure you use GitLab
26-
- Your app is already deployed on Google Play store
27-
- Desire to read 😆…
47+
### Pricing
48+
- One-time setup fee: $2,600
49+
- Your running costs: ~$300/year
50+
- Compare to Other proprietary solution: $6,000/year
51+
- **Save $26,100 over 5 years**
52+
53+
[Setup CI/CD Now](https://cal.com/martindonadieu/mobile-ci-cd-done-for-you/)
54+
55+
## Manual Setup Guide
56+
57+
If you still want to set up everything yourself, here's what you need to do:
2858

2959
**Steps to follow in the post**
3060

@@ -34,11 +64,9 @@ Before continuing with the tutorial…
3464
4. _Storing your Android signing key_
3565
5. _Set up your GitLab workflow .yml file_
3666

67+
## 1. Copy Fastline files
3768

38-
## 1\. Copy Fastline files
39-
40-
Fastlane is a Ruby library created to automate common mobile development tasks. Using Fastlane, you can configure custom “lanes” which bundle a series of “actions” that perform tasks that you’d normally perform using Android studio. You can do a lot with Fastlane, but for the purposes of this tutorial, we’ll be using only a handful of core actions.
41-
69+
Fastlane is a Ruby library created to automate common mobile development tasks. Using Fastlane, you can configure custom "lanes" which bundle a series of "actions" that perform tasks that you'd normally perform using Android studio. You can do a lot with Fastlane, but for the purposes of this tutorial, we'll be using only a handful of core actions.
4270

4371
Create a Fastlane folder at the root of your project and copy the following files:
4472
Fastlane
@@ -133,13 +161,45 @@ GitLab provides a way to store encrypted CI/CD variables, similar to GitHub's re
133161
2. Navigate to CI/CD > Variables
134162
3. Add the following variables:
135163

136-
- ANDROID_KEYSTORE_FILE:  the base64-encoded `.jks` or `.keystore` file used to sign your Android builds. This will either be the keystore file associated with your upload key (if using Play App Signing), or your app signing key.
164+
- ANDROID_KEYSTORE_FILE: the base64-encoded `.jks` or `.keystore` file used to sign your Android builds. This will either be the keystore file associated with your upload key (if using Play App Signing), or your app signing key.
137165
- KEYSTORE_KEY_PASSWORD: the password associated with the keystore file
138166
- KEYSTORE_KEY_ALIAS: the key store alias
139167
- KEYSTORE_STORE_PASSWORD: the private key password
140168
- DEVELOPER_PACKAGE_NAME: your android app ID like com.example.app
141169
- PLAY_CONFIG_JSON: The base64-encoded service account key JSON.
142170

171+
### Creating a Google Play Service Account Key
172+
173+
To generate the `PLAY_CONFIG_JSON` secret, follow these steps:
174+
175+
1. Go to the [Google Cloud Console](https://console.cloud.google.com/)
176+
2. Create a new project or select an existing one
177+
3. Enable the Google Play Android Developer API
178+
4. Create a service account:
179+
- Go to "IAM & Admin" > "Service Accounts"
180+
- Click "Create Service Account"
181+
- Give it a name and description
182+
- Click "Create and Continue"
183+
- Skip role assignment and click "Done"
184+
5. Generate a JSON key:
185+
- Find your service account in the list
186+
- Click the three dots menu > "Manage keys"
187+
- Click "Add Key" > "Create new key"
188+
- Choose JSON format
189+
- Click "Create"
190+
6. Grant the service account access to your app in the Play Console:
191+
- Go to [Play Console](https://play.google.com/console)
192+
- Navigate to "Users and permissions"
193+
- Click "Invite new users"
194+
- Enter the service account email (ends with @*.iam.gserviceaccount.com)
195+
- Grant "Release to production" permission
196+
- Click "Invite user"
197+
7. Convert the JSON key to base64:
198+
```bash
199+
base64 -i path/to/your/service-account-key.json | pbcopy
200+
```
201+
8. Add the base64-encoded string as the `PLAY_CONFIG_JSON` variable in GitLab
202+
143203
## Set Up Your GitLab CI/CD Pipeline
144204

145205
Create a .gitlab-ci.yml file at the root of your project to define your CI/CD pipeline. Below is an example of how you can structure your pipeline:

src/content/blog/en/automatic-capacitor-ios-build-codemagic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ We are going to use a **_macOS M1_** machine, you can see in the screenshot its
4242

4343
> **_📣_ In the post we assume that we have the app created in iTunes connect, we do have the certificates of the Apple ecosystem, everything will be setup by Codemagic!**
4444
45-
## Let’s go to the mess 🧑🏽💻
45+
## Let's dive in 🤿
4646

4747
**Steps to follow in the post**
4848

src/content/blog/en/automatic-capacitor-ios-build-github-action-with-match.md

Lines changed: 56 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,43 @@ locale: en
1818
next_blog: automatic-capacitor-android-build-github-action
1919
---
2020

21+
# Automatic iOS Builds with GitHub Actions using Match
22+
23+
Setting up CI/CD for Capacitor apps can be complex and time-consuming. Here's what you need to know:
24+
25+
## Prerequisites
26+
27+
Before starting, you'll need to set up:
28+
29+
- A GitHub account with admin access
30+
- iOS developer program membership
31+
- App Store Connect API access with proper permissions
32+
- Understanding of GitHub Actions workflows
33+
- Knowledge of Fastlane and Match configuration
34+
- Time to maintain and debug the pipeline
35+
- A team of many devs, otherwise we recommend to use [fastlane cert](/blog/automatic-capacitor-ios-build-github-action) for simpler workflows
36+
37+
## Professional CI/CD Setup by Capgo
38+
39+
Skip the complexity. [Capgo](https://capgo.app/ci-cd/) configures your CI/CD pipeline directly in your preferred platform:
40+
41+
- **Platform Independence**: Works with GitHub Actions, GitLab CI, or others
42+
- **Seamless Integration**: No platform switch needed, works with your current process
43+
- **Tailored Configuration**: Customized setup matching your project needs
44+
- **Expert Guidance**: We've already set up CI/CD for 50+ apps
45+
46+
### Pricing
47+
- One-time setup fee: $2,600
48+
- Your running costs: ~$300/year
49+
- Compare to Other proprietary solution: $6,000/year
50+
- **Save $26,100 over 5 years**
51+
52+
[Setup CI/CD Now](https://cal.com/martindonadieu/mobile-ci-cd-done-for-you/)
53+
54+
## Manual Setup Guide
55+
56+
If you still want to set up everything yourself, here's what you need to do:
57+
2158
## Continuous Delivery for iOS using Fastlane and GitHub Actions using match
2259

2360

@@ -36,14 +73,14 @@ Before continuing with the tutorial…
3673

3774
[https://github.com/features/actions](https://github.com/features/actions/)
3875

39-
The service is _free’_ up to the limit, depending on the chosen machine.
76+
The service is 'free' up to the limit, depending on the chosen machine.
4077
We are going to use a **_macOS_** machine, you can see in the screenshot its price and limits (prices as of the creation of the tutorial, they could undergo changes in the future)
4178

4279
🔴 **_Once warned of requirements and prices, if you like, we continue…_**
4380

4481
> **_📣_ In the post we assume that we have the app created in iTunes connect, we do have the certificates of the Apple ecosystem, everything will be copied by Fastlane!**
4582
46-
## Let’s go to the mess 🧑🏽💻
83+
## Let's dive in 🤿
4784

4885
**Steps to follow in the post**
4986

@@ -57,7 +94,7 @@ We are going to use a **_macOS_** machine, you can see in the screenshot its pri
5794

5895
## 1\. Using App Store Connect API with Fastlane Match
5996

60-
> Starting February 2021, two-factor authentication or two-step verification is required for all users to sign in to App Store Connect. This extra layer of security for your Apple ID helps ensure that youre the only person who can access your account.
97+
> Starting February 2021, two-factor authentication or two-step verification is required for all users to sign in to App Store Connect. This extra layer of security for your Apple ID helps ensure that you're the only person who can access your account.
6198
> From [Apple Support](https://developer.apple.com/support/authentication/)
6299
63100
> Getting started with match requires you to revoke your existing certificates. But no worry, you will have the new one directly.
@@ -73,7 +110,7 @@ To be able to use App Store Connect API, Fastlane needs **three** things.
73110

74111
## Creating an App Store Connect API Key
75112

76-
To generate keys, you must have Admin permission in App Store Connect. If you dont have that permission, you can direct the relevant person to this article and follow the following instructions.
113+
To generate keys, you must have Admin permission in App Store Connect. If you don't have that permission, you can direct the relevant person to this article and follow the following instructions.
77114

78115
1 — Log in to [App Store Connect](https://appstoreconnect.apple.com/).
79116

@@ -97,28 +134,28 @@ To generate keys, you must have Admin permission in App Store Connect. If you do
97134

98135
7 — Click Generate.
99136

100-
> **An API keys access cannot be limited to specific apps.**
137+
> **An API key's access cannot be limited to specific apps.**
101138
102-
The new keys name, key ID, a download link, and other information appear on the page.
139+
The new key's name, key ID, a download link, and other information appear on the page.
103140

104141
![App Store Connect download keys](/download_key.webp)
105142

106143
You can grab all three necessary information here.
107144
<1> Issue ID.
108145
<2> Key ID.
109-
<3> Click Download API Key to download your API private key. The download link appears only if the private key has not yet been downloaded. Apple does not keep a copy of the private key. So, you can download it only once.
146+
<3> Click "Download API Key" to download your API private key. The download link appears only if the private key has not yet been downloaded. Apple does not keep a copy of the private key. So, you can download it only once.
110147

111148
> _🔴_ Store your private key in a safe place. You should never share your keys, store keys in a code repository, or include keys in client-side code.
112149
113150
## Using an App Store Connect API Key
114151

115-
The API Key file (p8 file that you download), the key ID, and the issuer ID are needed to create the JWT token for authorization. There are multiple ways that these pieces of information can be input into Fastlane using Fastlanes new action, `app_store_connect_api_key`. You can learn other ways in [Fastlane documentation](https://docs.fastlane.tools/actions/app_store_connect_api_key/). I show this method because I think it is the easiest way to work with most CI out there, where you can set environment variables.
152+
The API Key file (p8 file that you download), the key ID, and the issuer ID are needed to create the JWT token for authorization. There are multiple ways that these pieces of information can be input into Fastlane using Fastlane's new action, `app_store_connect_api_key`. You can learn other ways in [Fastlane documentation](https://docs.fastlane.tools/actions/app_store_connect_api_key/). I show this method because I think it is the easiest way to work with most CI out there, where you can set environment variables.
116153

117154
_Now we can manage Fastlane with the App Store Connect API key, great!_
118155

119156
## 2\. Copy Fastline files
120157

121-
Fastlane is a Ruby library created to automate common mobile development tasks. Using Fastlane, you can configure custom lanes which bundle a series of actions that perform tasks that youd normally perform using Android studio. You can do a lot with Fastlane, but for the purposes of this tutorial, well be using only a handful of core actions.
158+
Fastlane is a Ruby library created to automate common mobile development tasks. Using Fastlane, you can configure custom "lanes" which bundle a series of "actions" that perform tasks that you'd normally perform using Android studio. You can do a lot with Fastlane, but for the purposes of this tutorial, we'll be using only a handful of core actions.
122159

123160

124161
Create a Fastlane folder at the root of your project and copy the following files:
@@ -266,7 +303,7 @@ team_id(ENV["DEVELOPER_PORTAL_TEAM_ID"])
266303

267304
## **Configure Fastlane match**
268305

269-
Fastlane [match](https://docs.fastlane.tools/actions/match/) is a new approach to iOSs code signing. Fastlane match makes it easy for teams to manage the required certificates and provisioning profiles for your iOS apps.
306+
Fastlane [match](https://docs.fastlane.tools/actions/match/) is a new approach to iOS's code signing. Fastlane match makes it easy for teams to manage the required certificates and provisioning profiles for your iOS apps.
270307

271308
Create a new private repository named `certificates`, for example on your GitHub personal account or organization.
272309

@@ -357,26 +394,26 @@ For private projects, the estimated cost per build can go up to **$0.08/min x 15
357394

358395
If you share the same concerns for the pricing as I do for private projects, you can keep the `skip_waiting_for_build_processing` to `true`.
359396

360-
Whats the catch? You have to manually update the compliance of your app in App Store Connect after the build has been processed, for you to distribute the build to your users.
397+
What's the catch? You have to manually update the compliance of your app in App Store Connect after the build has been processed, for you to distribute the build to your users.
361398

362-
This is just an optional parameter to update if you want to save on the build minutes for private projects. For free projects, this shouldnt be a problem at all. See [pricing](https://github.com/pricing/).
399+
This is just an optional parameter to update if you want to save on the build minutes for private projects. For free projects, this shouldn't be a problem at all. See [pricing](https://github.com/pricing/).
363400

364401

365402
## 3\. Setup GitHub Actions
366403

367404
**Configure GitHub secrets**
368405

369-
Ever wonder where the values of the `ENV` are coming from? Well, its not a secret anymore – its from your projects secret. 🤦
406+
Ever wonder where the values of the `ENV` are coming from? Well, it's not a secret anymore – it's from your project's secret. 🤦
370407

371408
![Set GitHub secrets](/github_secets.webp)
372409

373-
1\. `APP_STORE_CONNECT_TEAM_ID` - the ID of your App Store Connect team in youre in multiple teams.
410+
1\. `APP_STORE_CONNECT_TEAM_ID` - the ID of your App Store Connect team in you're in multiple teams.
374411

375412
2\. `DEVELOPER_APP_ID` - in App Store Connect, go to the app → **App Information** → Scroll down to the `General Information` section of your app and look for `Apple ID`.
376413

377-
3\. `DEVELOPER_APP_IDENTIFIER` - your apps bundle identifier.
414+
3\. `DEVELOPER_APP_IDENTIFIER` - your app's bundle identifier.
378415

379-
4\. `DEVELOPER_PORTAL_TEAM_ID` - the ID of your Developer Portal team if youre in multiple teams.
416+
4\. `DEVELOPER_PORTAL_TEAM_ID` - the ID of your Developer Portal team if you're in multiple teams.
380417

381418
5\. `FASTLANE_APPLE_ID` - the Apple ID or developer email you use to manage the app.
382419

@@ -503,9 +540,9 @@ Yes, you can, and it is effortless.
503540

504541
Imagine that you have a private repository, and you have used up the minutes of the free plan and you do not want to pay for new releases, or maybe you prefer to submit the application manually.
505542

506-
**_Lets go for it_**
543+
**_Let's go for it_**
507544

508-
Ok, first we need to create in **_my\_project\_path/fastlane_** path a file called **_.env,_** just in the same path as _Fastfile,_ to be able to create the same _secret_ properties found in our _GitHub, a_s below:
545+
Ok, first we need to create in _my_project_path/fastlane_ path a file called **_.env,_** just in the same path as _Fastfile,_ to be able to create the same _secret_ properties found in our _GitHub, a_s below:
509546

510547
.env file for deploy from local machine
511548

@@ -525,7 +562,7 @@ It should work the same as it happens from GitHub Actions on the remote machine
525562
526563
![Local Fastlane run](/local_fastlane.webp)
527564
528-
Terminal execution: $ Fastlane closed\_beta
565+
Terminal execution: $ Fastlane closed_beta
529566
530567
**_If you have come this far, my congratulations, now you have a fully automated process for your iOS apps with Fastlane and GitHub Actions._**
531568

src/content/blog/en/automatic-capacitor-ios-build-github-action.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,43 @@ locale: en
1818
next_blog: automatic-capacitor-android-build-github-action
1919
---
2020

21+
# Automatic iOS Builds with GitHub Actions using Certificates
22+
23+
Setting up CI/CD for Capacitor apps can be complex and time-consuming. Here's what you need to know:
24+
25+
## Prerequisites
26+
27+
Before starting, you'll need to set up:
28+
29+
- A GitHub account with admin access
30+
- iOS developer program membership
31+
- App Store Connect API access with proper permissions
32+
- Understanding of GitHub Actions workflows
33+
- Knowledge of Fastlane configuration
34+
- Time to maintain and debug the pipeline
35+
- Proper certificates and provisioning profiles
36+
37+
## Professional CI/CD Setup by Capgo
38+
39+
Skip the complexity. [Capgo](https://capgo.app/ci-cd/) configures your CI/CD pipeline directly in your preferred platform:
40+
41+
- **Platform Independence**: Works with GitHub Actions, GitLab CI, or others
42+
- **Seamless Integration**: No platform switch needed, works with your current process
43+
- **Tailored Configuration**: Customized setup matching your project needs
44+
- **Expert Guidance**: We've already set up CI/CD for 50+ apps
45+
46+
### Pricing
47+
- One-time setup fee: $2,600
48+
- Your running costs: ~$300/year
49+
- Compare to Other proprietary solution: $6,000/year
50+
- **Save $26,100 over 5 years**
51+
52+
[Setup CI/CD Now](https://cal.com/martindonadieu/mobile-ci-cd-done-for-you/)
53+
54+
## Manual Setup Guide
55+
56+
If you still want to set up everything yourself, here's what you need to do:
57+
2158
## Continuous Delivery for iOS using Fastlane and GitHub Actions and certificate
2259

2360

@@ -404,7 +441,7 @@ Go to **Settings** > **Secrets and variables** > **Actions** > **New repository
404441

405442
3\. `BUILD_PROVISION_PROFILE_BASE64` - Base64 encoded provisioning profile.
406443

407-
4\. `BUNDLE_IDENTIFIER` - your apps bundle identifier.
444+
4\. `BUNDLE_IDENTIFIER` - your app's bundle identifier.
408445

409446
5\. `APPLE_KEY_ID` — App Store Connect API Key 🔺Key ID.
410447

src/css/markdown.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
}
44

55
.blog.prose * {
6-
line-height: 2 !important;
6+
line-height: 2;
77
}
88

99
.blog.prose img {
10-
width: 100% !important;
10+
width: 90%;
11+
margin: 0 auto;
1112
border-radius: 0.5rem !important;
1213
}
1314

1415
.blog.prose blockquote {
15-
color: theme('colors.pumpkinOrange.300') !important;
16+
color: theme('colors.pumpkinOrange.300');
1617
}
1718

1819
/* Table styling */

0 commit comments

Comments
 (0)