An open API service indexing awesome lists of open source software.

https://github.com/pmleczek/eas-ssh-keys-example

An example of setting up SSH keys for GitHub on Expo EAS
https://github.com/pmleczek/eas-ssh-keys-example

eas expo ssh-keys

Last synced: about 1 month ago
JSON representation

An example of setting up SSH keys for GitHub on Expo EAS

Awesome Lists containing this project

README

          

# Setting up GitHub SSH keys on Expo EAS

### This repository contains the source code for tutorial at: https://blog.swmansion.com/setting-up-github-ssh-key-on-expo-eas-e678c134bf3f

## 📄 Overview

[Expo Application Services (EAS)](https://expo.dev/eas) is a set of powerful and highly customizable tools for building your React Native apps, automating the CI/CD and streamlined submissions to the app stores. It offers out-of-the-box integration with GitHub, allowing you to e.g. run CI/CD workflows on each pull request or push to the specific branch. But sometimes we might just need to perform some operations on a repository without the full integration, which would require us to set up access to GitHub on the EAS runner. This example explores three different ways of configuring such access on Expo EAS.

## 🗂️ Project structure


.
├── .eas/ # Expo EAS configuration files
│ ├── build/ # Custom build configurations
│ │ ├── custom-build.yml # Custom build configuration
│ ├── setupGithubAccess/ # EAS TypeScript function
│ │ ├── build/ # Built artifacts of the function
│ │ ├── src/ # Function sources
│ │ │ ├── index.ts # Function entrypoint
├── app/ # Expo app router files
├── assets/ # App assets
├── components/ # App components
├── constants/ # App constants
├── hooks/ # App hooks
├── scripts/ # Scripts
│ ├── new-tag.sh/ # Script releasing new tag in the repository
│ ├── reset-project.js # Expo script for resetting the project
│ ├── setup-github-access.sh/ # Script setting up SSH key for GitHub access on EAS
├── app.json/ # Expo project configuration file
├── eas.json/ # Expo EAS configuration file

## 🔨 Building the project

### ⚙️ Preqrequisites

Before building this example please make sure that:

- You have correct EAS `projectId` set up in `app.json`

- You have configured the SSH key both on GitHub and as an Expo EAS environment variable – instructions for those steps can be found in the tutorial

- Replaced the repo name and URL with your data in `scripts/new-tag.sh`

- Specified the correct Git email address and user name either in `scripts/setup-github-access.sh` or in `.eas/build/setupGithubAccess/src/index.ts` depending on your choice

### 🏗️ Rebuilding the TypeScript function

If you plan to use and made any changes to the TypeScript function make sure to rebuild it by cd-ing into its directory and running the following command:

```bash
cd .eas/build/setupGithubAccess

npm run build
```

### ☁️ Building on EAS cloud

Run the following command to start an EAS cloud build:

```
eas build -p -e

# e.g.

eas build -p android -e development
```

**Note:** The build can also be run locally by appending the `--local` flag to the above command, e.g:

```
eas build -p android -e development --local
```

## [Community Discord](https://discord.swmansion.com)

[Join the Software Mansion Community Discord](https://discord.swmansion.com) to chat about this example and other Software Mansion solutions.

## This project is created by [Software Mansion](https://swmansion.com)

[![swm](https://logo.swmansion.com/logo?color=white&variant=desktop&width=150 'Software Mansion')](https://swmansion.com)

Since 2012 [Software Mansion](https://swmansion.com) is a software agency with
experience in building web and mobile apps. We are Core React Native
Contributors and experts in dealing with all kinds of React Native issues. We
can help you build your next dream product –
[Hire us](https://swmansion.com/contact/projects).

Made by [@software-mansion](https://github.com/software-mansion) 💙