Skip to content

Commit

Permalink
Add Github Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
deepankvora committed Jul 6, 2024
1 parent fa0949c commit d646a2b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build & Test on Runpad

on:
push:
branches: ['main']

jobs:
build:
name: Build & Test on Runpad
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build with Xcode
run: |
DERIVED_DATA_PATH=/tmp/runpad-github-actions-example-ios-$(uuidgen)
xcodebuild clean build \
-scheme runpad-github-actions-example-ios \
-project runpad-github-actions-example-ios.xcodeproj \
-configuration Release \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath "$DERIVED_DATA_PATH" \
clean build
echo "APP_DIR_PATH=${DERIVED_DATA_PATH}/Build/Products/Release-iphonesimulator/runpad-github-actions-example-ios.app" >>$GITHUB_ENV
- name: Runpad - Install Runpad CLI
run: |
curl -fsSL https://downloads.bytesalt.com/runpad-cli-install.sh | bash
- name: Runpad - Run tests
# Store your Runpad client ID and secret as secrets in your Github repository
# Guide: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository
env:
RUNPAD_CLIENT_ID: ${{ secrets.RUNPAD_CLIENT_ID }}
RUNPAD_CLIENT_SECRET: ${{ secrets.RUNPAD_CLIENT_SECRET }}
# Replace the project-id value with your Runpad project ID
run: |
runpad run \
--project-id=11ef182a-b845-f420-9741-6973dfd76499 \
--platform=ios \
--device='iPhone 15 Pro' \
--build-path=${{ env.APP_DIR_PATH }}
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Runpad - Github Actions Example iOS

This repository demonstrates the integration of [Bytesalt Runpad](https://bytesalt.com/) with GitHub Actions for an iOS app.

## Setup

1. Generate CI client credentials by following the [CI Integration guide](https://bytesalt.com/docs/runpad/ci-integration/generate-ci-client-credentials).
2. Store the generated credentials as GitHub secrets in your repository:

- `RUNPAD_CLIENT_ID`
- `RUNPAD_CLIENT_SECRET`

Refer to [this Github documentation](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) for detailed instructions.

3. Check the .github/workflows/build-and-test.yaml file for a reference configuration. Update it with your own Runpad project ID and build configurations.

0 comments on commit d646a2b

Please sign in to comment.