Skip to content

Commit 2a86d91

Browse files
authored
repo sync
2 parents dae273e + 6338003 commit 2a86d91

12 files changed

Lines changed: 185 additions & 15 deletions

content/actions/guides/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ includeGuides:
4242
- /actions/guides/building-and-testing-java-with-maven
4343
- /actions/guides/building-and-testing-java-with-gradle
4444
- /actions/guides/building-and-testing-java-with-ant
45+
- /actions/guides/installing-an-apple-certificate-on-macos-runners-for-xcode-development
4546
- /actions/guides/publishing-nodejs-packages
4647
- /actions/guides/publishing-java-packages-with-maven
4748
- /actions/guides/publishing-java-packages-with-gradle
@@ -81,6 +82,7 @@ includeGuides:
8182
<!-- {% link_in_list /building-and-testing-java-with-maven %} -->
8283
<!-- {% link_in_list /building-and-testing-java-with-gradle %} -->
8384
<!-- {% link_in_list /building-and-testing-java-with-ant %} -->
85+
<!-- {% link_in_list /installing-an-apple-certificate-on-macos-runners-for-xcode-development %} -->
8486
<!-- {% link_in_list /about-packaging-with-github-actions %} -->
8587
<!-- {% link_in_list /publishing-nodejs-packages %} -->
8688
<!-- {% link_in_list /publishing-java-packages-with-maven %} -->
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: Installing an Apple certificate on macOS runners for Xcode development
3+
intro: 'You can sign Xcode apps within your continuous integration (CI) workflow by installing an Apple code signing certificate on {% data variables.product.prodname_actions %} runners.'
4+
product: '{% data reusables.gated-features.actions %}'
5+
versions:
6+
free-pro-team: '*'
7+
enterprise-server: '>=2.22'
8+
github-ae: '*'
9+
type: 'tutorial'
10+
topics:
11+
- 'CI'
12+
- 'Xcode'
13+
---
14+
15+
{% data reusables.actions.enterprise-beta %}
16+
{% data reusables.actions.enterprise-github-hosted-runners %}
17+
{% data reusables.actions.ae-beta %}
18+
19+
### Introduction
20+
21+
This guide shows you how to add a step to your continuous integration (CI) workflow that installs an Apple code signing certificate and provisioning profile on {% data variables.product.prodname_actions %} runners. This will allow you to sign your Xcode apps for publishing to the Apple App Store, or distributing it to test groups.
22+
23+
### Prerequisites
24+
25+
You should be familiar with YAML and the syntax for {% data variables.product.prodname_actions %}. For more information, see:
26+
27+
- "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)"
28+
- "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions)"
29+
30+
You should have an understanding of Xcode app building and signing. For more information, see the [Apple developer documentation](https://developer.apple.com/documentation/).
31+
32+
### Creating secrets for your certificate and provisioning profile
33+
34+
The signing process involves storing certificates and provisioning profiles, transferring them to the runner, importing them to the runner's keychain, and using them in your build.
35+
36+
To use your certificate and provisioning profile on a runner, we strongly recommend that you use {% data variables.product.prodname_dotcom %} secrets. For more information on creating secrets and using them in a workflow, see "[Encrypted secrets](/actions/reference/encrypted-secrets)."
37+
38+
Create secrets in your repository or organization for the following items:
39+
40+
* Your Apple signing certificate.
41+
42+
- This is your `p12` certificate file. For more information on exporting your signing certificate from Xcode, see the [Xcode documentation](https://help.apple.com/xcode/mac/current/#/dev154b28f09).
43+
44+
- You should convert your certificate to Base64 when saving it as a secret. In this example, the secret is named `BUILD_CERTIFICATE_BASE64`.
45+
46+
- Use the following command to convert your certificate to Base64 and copy it to your clipboard:
47+
48+
```shell
49+
base64 <em>build_certificate</em>.p12 | pbcopy
50+
```
51+
* The password for your Apple signing certificate.
52+
- In this example, the secret is named `P12_PASSWORD`.
53+
54+
* Your Apple provisioning profile.
55+
56+
- For more information on exporting your provisioning profile from Xcode, see the [Xcode documentation](https://help.apple.com/xcode/mac/current/#/deva899b4fe5).
57+
58+
- You should convert your provisioning profile to Base64 when saving it as a secret. In this example, the secret is named `BUILD_PROVISION_PROFILE_BASE64`.
59+
60+
- Use the following command to convert your provisioning profile to Base64 and copy it to your clipboard:
61+
62+
```shell
63+
base64 <em>provisioning_profile.mobileprovision</em> | pbcopy
64+
```
65+
66+
* A keychain password.
67+
68+
- A new keychain will be created on the runner, so the password for the new keychain can be any new random string. In this example, the secret is named `KEYCHAIN_PASSWORD`.
69+
70+
### Add a step to your workflow
71+
72+
This example workflow includes a step that imports the Apple certificate and provisioning profile from the {% data variables.product.prodname_dotcom %} secrets, and installs them on the runner.
73+
74+
{% raw %}
75+
```yaml{:copy}
76+
name: App build
77+
on: push
78+
79+
jobs:
80+
build_with_signing:
81+
runs-on: macos-latest
82+
83+
steps:
84+
- name: Checkout repository
85+
uses: actions/checkout@v2
86+
- name: Install the Apple certificate and provisioning profile
87+
env:
88+
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
89+
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
90+
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
91+
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
92+
run: |
93+
# create variables
94+
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
95+
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
96+
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
97+
98+
# import certificate and provisioning profile from secrets
99+
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
100+
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH
101+
102+
# create temporary keychain
103+
security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH
104+
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
105+
security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH
106+
107+
# import certificate to keychain
108+
security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
109+
security list-keychain -d user -s $KEYCHAIN_PATH
110+
111+
# apply provisioning profile
112+
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
113+
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
114+
- name: Build app
115+
...
116+
```
117+
{% endraw %}
118+
119+
### Required clean-up on self-hosted runners
120+
121+
{% data variables.product.prodname_dotcom %}-hosted runners are isolated virtual machines that are automatically destroyed at the end of the job execution. This means that the certificates and provisioning profile used on the runner during the job will be destroyed with the runner when the job is completed.
122+
123+
On self-hosted runners, the `$RUNNER_TEMP` directory is cleaned up at the end of the job execution, but the keychain and provisioning profile might still exist on the runner.
124+
125+
If you use self-hosted runners, you should add a final step to your workflow to help ensure that these sensitive files are deleted at the end of the job. The workflow step shown below is an example of how to do this.
126+
127+
{% raw %}
128+
```yaml
129+
- name: Clean up keychain and provisioning profile
130+
if: ${{ always() }}
131+
run: |
132+
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
133+
rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision
134+
```
135+
{% endraw %}

content/admin/enterprise-management/about-geo-replication.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Geo DNS, such as [Amazon's Route 53 service](http://docs.aws.amazon.com/Route53/
2222

2323
Writing requests to the replica requires sending the data to the primary and all replicas. This means that the performance of all writes are limited by the slowest replica, although new geo-replicas can seed the majority of their data from existing co-located geo-replicas, rather than from the primary. Geo-replication will not add capacity to a {% data variables.product.prodname_ghe_server %} instance or solve performance issues related to insufficient CPU or memory resources. If the primary appliance is offline, active replicas will be unable to serve any read or write requests.
2424

25+
{% data reusables.enterprise_installation.replica-limit %}
26+
2527
### Monitoring a geo-replication configuration
2628

2729
{% data reusables.enterprise_installation.monitoring-replicas %}

content/admin/enterprise-management/about-high-availability-configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ When you configure high availability, there is an automated setup of one-way, as
1414

1515
{% data variables.product.prodname_ghe_server %} supports an active/passive configuration, where the replica appliance runs as a standby with database services running in replication mode but application services stopped.
1616

17+
{% data reusables.enterprise_installation.replica-limit %}
18+
1719
### Targeted failure scenarios
1820

1921
Use a high availability configuration for protection against:

content/admin/enterprise-management/creating-a-high-availability-replica.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ topics:
1010
- enterprise
1111
---
1212

13+
{% data reusables.enterprise_installation.replica-limit %}
14+
1315
### Creating a high availability replica
1416

1517
1. Set up a new {% data variables.product.prodname_ghe_server %} appliance on your desired platform. The replica appliance should mirror the primary appliance's CPU, RAM, and storage settings. We recommend that you install the replica appliance in an independent environment. The underlying hardware, software, and network components should be isolated from those of the primary appliance. If you are a using a cloud provider, use a separate region or zone. For more information, see ["Setting up a {% data variables.product.prodname_ghe_server %} instance"](/enterprise/{{ currentVersion }}/admin/guides/installation/setting-up-a-github-enterprise-server-instance).

data/allowed-topics.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,6 @@ module.exports = [
8080
'sso',
8181
'teams',
8282
'usernames',
83-
'webhooks'
83+
'webhooks',
84+
'Xcode'
8485
]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% if currentVersion ver_gt "enterprise-server@2.21" %}
2+
{% note %}
3+
4+
**Note:** There is a maximum of 8 high availability replicas (both passive and active/geo replicas) allowed for {% data variables.product.product_name %}.
5+
6+
{% endnote %}
7+
8+
{% endif %}

data/ui.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,12 @@ product_landing:
143143
product_sublanding:
144144
start: Start
145145
start_path: Start path
146-
learning_paths: Learning paths
146+
learning_paths: '{{ allProducts[currentProduct].name }} learning paths'
147147
learning_paths_desc: Learning paths are a collection of guides that help you master a particular subject.
148+
guides: '{{ allProducts[currentProduct].name }} guides'
148149
more_guides: more guides
149150
load_more: Load more guides
150-
all_guides: All Guides
151+
all_guides: 'All {{ allProducts[currentProduct].name }} guides'
151152
no_result: Sorry, there is no guide that match your filter.
152153
filters:
153154
type: Type

includes/liquid-tags/link-as-article-card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h4 class="h4 text-gray-dark mb-1">{{ title }}</h4>
66
{% if topics.length %}
77
<div>
88
{% for topic in topics %}
9-
<span class="IssueLabel bg-gradient--purple-pink text-white mr-1">{{ topic }}</span>
9+
<span class="IssueLabel bg-gradient--pink-blue text-white mr-1">{{ topic }}</span>
1010
{% endfor %}
1111
</div>
1212
{% endif %}

layouts/product-sublanding.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<div class="container-xl px-3 px-md-6 pt-3 pb-2">
1616
<header class="d-flex gutter mb-6">
1717
<div class="col-12">
18-
<span class="text-mono text-gray">{% include breadcrumbs %}</span>
19-
<h1 class="my-3 font-mktg">{{ page.shortTitle }}</h1>
20-
<div class="lead-mktg text-gray">{{ page.intro }}</div>
18+
<span class="text-mono text-gray text-uppercase">{% include breadcrumbs %}</span>
19+
<h1 class="my-3 font-mktg">{% data ui.product_sublanding.guides %}</h1>
20+
<div class="lead-mktg text-gray f4 description-text">{{ page.intro }}</div>
2121
</div>
2222
</header>
2323

@@ -26,7 +26,7 @@ <h1 class="my-3 font-mktg">{{ page.shortTitle }}</h1>
2626
{% assign featuredTrack = page.learningTracks[0] %}
2727
<ul class="list-style-none d-flex flex-nowrap overflow-x-scroll px-2 feature-track">
2828
<li class="px-2 d-flex flex-shrink-0">
29-
<div class="d-inline-block Box p-5 bg-gradient--blue-purple text-white">
29+
<div class="d-inline-block Box p-5 bg-gradient--blue-pink text-white">
3030
<div class="circle text-white d-inline-flex" style="border: 2px white solid;">{% octicon "star-fill" height="24" class="v-align-middle m-2"%}</div>
3131
<h3 class="font-mktg h3-mktg my-4">{{ featuredTrack.title }}</h3>
3232
<div class="lead-mktg text-white f5 my-4">{{ featuredTrack.description }}</div>
@@ -40,8 +40,8 @@ <h3 class="font-mktg h3-mktg my-4">{{ featuredTrack.title }}</h3>
4040
<li class="px-2 d-flex flex-shrink-0">
4141
<a href="{{ guide.href }}?learn={{ featuredTrack.trackName }}" class="d-inline-block Box p-5 bg-white border-gray no-underline">
4242
<div class="d-flex flex-justify-between flex-items-center">
43-
<div class="circle bg-white text-blue border-gradient--purple-pink d-inline-flex">
44-
<span class="m-2 f2 lh-condensed-ultra text-center text-bold text-gradient--blue-purple" style="width: 24px; height: 24px;">{{ forloop.index }}</span>
43+
<div class="circle bg-white text-blue border-gradient--pink-blue-dark d-inline-flex">
44+
<span class="m-2 f2 lh-condensed-ultra text-center text-bold step-circle-text" style="width: 24px; height: 24px;">{{ forloop.index }}</span>
4545
</div>
4646
<div class="text-gray-light h6 text-uppercase">{{ guideTypes[guide.page.type] }}</div>
4747
</div>
@@ -57,14 +57,14 @@ <h3 class="font-mktg h3-mktg my-4 text-gray-dark">{{ guide.title }}</h3>
5757

5858
<div class="border-top py-6">
5959
<h2 class="mb-3 font-mktg">{% data ui.product_sublanding.learning_paths %}</h2>
60-
<div class="lead-mktg text-gray f4">{% data ui.product_sublanding.learning_paths_desc %}</div>
60+
<div class="lead-mktg text-gray f4 description-text">{% data ui.product_sublanding.learning_paths_desc %}</div>
6161

6262
<!-- Learning tracks -->
6363
<div class="d-flex flex-wrap flex-items-start my-5 gutter">
6464
{% for track in page.learningTracks offset:1 %}
6565
<div class="my-3 px-4 col-12 col-md-6 learning-track">
6666
<div class="Box js-show-more-container d-flex flex-column">
67-
<div class="Box-header bg-gradient--purple-pink p-4 d-flex flex-1 flex-items-start flex-wrap">
67+
<div class="Box-header bg-gradient--blue-pink p-4 d-flex flex-1 flex-items-start flex-wrap">
6868
<div class="d-flex flex-auto flex-items-start col-8 col-md-12 col-xl-8">
6969
<div class="my-xl-0 mr-xl-3">
7070
<h5 class="mb-3 text-white font-mktg h3-mktg ">
@@ -82,7 +82,7 @@ <h5 class="mb-3 text-white font-mktg h3-mktg ">
8282
{% for guide in track.guides %}
8383
<a class="Box-row d-flex flex-items-center text-gray-dark no-underline js-show-more-item {% if forloop.index > 4 %}d-none{% endif %}" href="{{ guide.href }}?learn={{ track.trackName }}">
8484
<div class="circle bg-gray d-inline-flex mr-4">
85-
<span class="m-2 f3 lh-condensed-ultra text-center text-bold text-gradient--purple-pink" style="min-width: 20px; height: 20px;">{{ forloop.index }}</span>
85+
<span class="m-2 f3 lh-condensed-ultra text-center text-bold step-circle-text" style="min-width: 20px; height: 20px;">{{ forloop.index }}</span>
8686
</div>
8787
<h5 class="flex-auto pr-2">{{ guide.title }}</h5>
8888
<div class="text-gray-light h6 text-uppercase">{{ guideTypes[guide.page.type] }}</div>

0 commit comments

Comments
 (0)