Skip to content

Commit

Permalink
Merge pull request #31 from BogiKay/feat/testflight
Browse files Browse the repository at this point in the history
feat: TestFlight distribution
  • Loading branch information
BogiKay authored Feb 11, 2025
2 parents 75ed16d + 42bd92d commit c0f626a
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/testflight-distribution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Testflight Distribution
on:
push:
branches:
- 'main'

jobs:
build-and-distribute-to-testflight:
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Install pods
run: pnpm --filter MobileHost pods

- name: Run fastlane TestFlight distribution lane
working-directory: 'apps/mobile-host/ios'
env:
APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER }}
APPLE_ID: ${{ secrets.APPLE_ID }}
KEY_ID: ${{ secrets.KEY_ID }}
ISSUER_ID: ${{ secrets.ISSUER_ID }}
KEY_CONTENT: ${{ secrets.KEY_CONTENT }}
GIT_URL: ${{ secrets.GIT_URL }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
BUILD_NUMBER: ${{ github.run_number }}
run: fastlane testflight_distribution
2 changes: 2 additions & 0 deletions apps/mobile-host/ios/fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
app_identifier(ENV['APP_IDENTIFIER'])
apple_id(ENV['APPLE_ID'])
37 changes: 37 additions & 0 deletions apps/mobile-host/ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
default_platform(:ios)

platform :ios do
desc "Builds and uploads the app to TestFlight"
lane :testflight_distribution do
setup_ci if ENV['CI']

api_key = app_store_connect_api_key(
key_id: ENV['KEY_ID'],
issuer_id: ENV['ISSUER_ID'],
key_content: ENV['KEY_CONTENT'],
is_key_content_base64: true,
in_house: false,
)

match(
type: "appstore",
api_key: api_key,
app_identifier: ENV['APP_IDENTIFIER'],
readonly: ENV['CI']
)

increment_build_number(
build_number: ENV["BUILD_NUMBER"],
)

gym(
scheme: "host",
export_method: "app-store",
)

pilot(
skip_waiting_for_build_processing: true,
api_key: api_key,
)
end
end
3 changes: 3 additions & 0 deletions apps/mobile-host/ios/fastlane/Matchfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
git_url(ENV['GIT_URL'])
storage_mode("git")
type("development")
32 changes: 32 additions & 0 deletions apps/mobile-host/ios/fastlane/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
fastlane documentation
----

# Installation

Make sure you have the latest version of the Xcode command line tools installed:

```sh
xcode-select --install
```

For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)

# Available Actions

## iOS

### ios testflight_distribution

```sh
[bundle exec] fastlane testflight_distribution
```

Builds and uploads the app to TestFlight

----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).

The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

0 comments on commit c0f626a

Please sign in to comment.