-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from BogiKay/feat/testflight
feat: TestFlight distribution
- Loading branch information
Showing
5 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
app_identifier(ENV['APP_IDENTIFIER']) | ||
apple_id(ENV['APPLE_ID']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
git_url(ENV['GIT_URL']) | ||
storage_mode("git") | ||
type("development") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |