Skip to content

Commit

Permalink
Build documentation updates (#103)
Browse files Browse the repository at this point in the history
* Docs update
* Remove residual Airtable references
  • Loading branch information
allanlang authored Mar 8, 2023
1 parent 4926f7f commit 003d9f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
env:
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
CLOUDINARY_UPLOAD_PRESET_NAME: ${{ secrets.CLOUDINARY_UPLOAD_PRESET_NAME }}
TEST_AIRTABLE_API_KEY: ${{ secrets.TEST_AIRTABLE_API_KEY }}
TEST_AIRTABLE_BASE_ID: ${{ secrets.TEST_AIRTABLE_BASE_ID }}
TEST_AIRTABLE_TABLE_NAME_PREFIX: ${{ secrets.TEST_AIRTABLE_TABLE_NAME_PREFIX }}
PROTECT_EARTH_API_TOKEN: ${{ secrets.PROTECT_EARTH_API_TOKEN }}
PROTECT_EARTH_API_BASE_URL: ${{ secrets.PROTECT_EARTH_API_BASE_URL }}
PROTECT_EARTH_ENV_NAME: ${{ secrets.PROTECT_EARTH_ENV_NAME }}
Expand Down Expand Up @@ -56,9 +53,6 @@ jobs:
env:
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
CLOUDINARY_UPLOAD_PRESET_NAME: ${{ secrets.CLOUDINARY_UPLOAD_PRESET_NAME }}
TEST_AIRTABLE_API_KEY: ${{ secrets.TEST_AIRTABLE_API_KEY }}
TEST_AIRTABLE_BASE_ID: ${{ secrets.TEST_AIRTABLE_BASE_ID }}
TEST_AIRTABLE_TABLE_NAME_PREFIX: ${{ secrets.TEST_AIRTABLE_TABLE_NAME_PREFIX }}
PROTECT_EARTH_API_TOKEN: ${{ secrets.PROTECT_EARTH_API_TOKEN }}
PROTECT_EARTH_API_BASE_URL: ${{ secrets.PROTECT_EARTH_API_BASE_URL }}
PROTECT_EARTH_ENV_NAME: ${{ secrets.PROTECT_EARTH_ENV_NAME }}
Expand Down Expand Up @@ -128,9 +122,6 @@ jobs:
env:
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
CLOUDINARY_UPLOAD_PRESET_NAME: ${{ secrets.CLOUDINARY_UPLOAD_PRESET_NAME }}
TEST_AIRTABLE_API_KEY: ${{ secrets.TEST_AIRTABLE_API_KEY }}
TEST_AIRTABLE_BASE_ID: ${{ secrets.TEST_AIRTABLE_BASE_ID }}
TEST_AIRTABLE_TABLE_NAME_PREFIX: ${{ secrets.TEST_AIRTABLE_TABLE_NAME_PREFIX }}
PROTECT_EARTH_API_TOKEN: ${{ secrets.PROTECT_EARTH_API_TOKEN }}
PROTECT_EARTH_API_BASE_URL: ${{ secrets.PROTECT_EARTH_API_BASE_URL }}
PROTECT_EARTH_ENV_NAME: ${{ secrets.PROTECT_EARTH_ENV_NAME }}
Expand Down
24 changes: 14 additions & 10 deletions CICD.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CI/CD for Tree Tracker has been configured with GitHub Actions to allow new buil

## Workflow

The GitHub Actions workflow is located in `.github/workflows/build-release.yaml` and will trigger on any push or pull request for the repository. If the triggering event is a merge to `main`, the resulting application will also be published to TestFlight. Unit tests are executed early on in the workflow, which will exit if these do not pass.
The GitHub Actions workflow is located in `.github/workflows/build-release.yaml` and will trigger on any push or pull request for the repository. If the triggering event is a merge to `main` AND it is not a pull request (i.e. a validation build as part of PR review), the resulting application will also be published to TestFlight. Unit tests are executed early on in the workflow, which will exit if these do not pass.

## Pre-requisites

Expand All @@ -12,26 +12,30 @@ In order for the workflow to run successfully, repository secrets must be config
To add these, navigate to _Settings > Security > Secrets > Actions_ and add the following as repository secrets with the appropriate values:

```
AIRTABLE_API_KEY
AIRTABLE_BASE_ID
AIRTABLE_TREES_TABLE_NAME
AIRTABLE_SPECIES_TABLE_NAME
AIRTABLE_SUPERVISORS_TABLE_NAME
AIRTABLE_SITES_TABLE_NAME
CLOUDINARY_CLOUD_NAME
CLOUDINARY_UPLOAD_PRESET_NAME
PROTECT_EARTH_API_TOKEN
PROTECT_EARTH_API_BASE_URL
PROTECT_EARTH_ENV_NAME
ROLLBAR_AUTH_TOKEN
```

Finally, additional secrets must be configured to store the details required for signing and publishing the app to the AppStore. Add the following secrets in the same way as before, with the appropriate values:
Finally, additional secrets must be configured to store the details required for signing and publishing the app to the AppStore. Add the following secrets in the same way as before, with the appropriate values. Note that `KEYCHAIN_PASSWORD` can be any random string. It is used to secure the temporary keychain created during the build process, and is not referenced anywhere outside of the build.

```
PROVISIONING_PROFILE_BASE64
DISTRIBUTION_CERT_BASE64
DISTRIBUTION_CERT_PASSWORD
KEYCHAIN_PASSWORD
APPLE_APPLE_ID
APPLE_APP_SPECIFIC_PASSWORD
```

The provisioning profile used is currently _iOS App Store Distribution Profile 20220213_, which may be downloaded from AppStore Connect. Both files should be encoded to base64 via the following command line:
The provisioning profile used is currently _iOS AppStore Profile 07Mar2023_, which may be downloaded from AppStore Connect. Signing certificates may be managed in XCode and exported from there as a `.p12` file. See https://help.apple.com/xcode/mac/current/#/dev154b28f09 for instructions.

> **_NOTE:_** A new provisioning profile will need to be created annually since both the profile and the signing certificate it references expire after 1 year.
Both files should be encoded to base64 via the following command line:

`cat <path/to/file> | base64`

Expand All @@ -43,4 +47,4 @@ The App Specific Password is essentially an additional password which you can us

## TestFlight notes

The build number of the app is set to the run number of the workflow using `agvtool`. Updates to the release number should be made manually via a PR. Once published, compliance requirements will need to be accepted manually in TestFlight, and the appropriate tester groups will need to be added in order to get access to the latest build.
The build number of the app is set to the run number of the workflow using `agvtool`. Updates to the release number (_marketing version_) should be made manually via `agvtool new-marketing-version` and committed via a PR. Once published, the appropriate tester groups will need to be added in order to get access to the latest build.

0 comments on commit 003d9f7

Please sign in to comment.