-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: release regtest ios app on push to main
- Loading branch information
Showing
22 changed files
with
1,070 additions
and
91 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 |
---|---|---|
|
@@ -6,3 +6,20 @@ ESPLORA_ENDPOINT=http://35.189.57.114:3000 | |
COORDINATOR_P2P_ENDPOINT=03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802@35.189.57.114:9045 | ||
COORDINATOR_PORT_HTTP=80 | ||
NETWORK=regtest | ||
# Fastlane variables | ||
FASTLANE_DEVELOPER_APP_ID="1234567890" | ||
#FASTLANE_DEVELOPER_APP_IDENTIFIER="finance.get10101.app.test" | ||
FASTLANE_DEVELOPER_APP_IDENTIFIER="finance.get10101.app" | ||
#FASTLANE_PROVISIONING_PROFILE_SPECIFIER="match AppStore finance.get10101.app.test" | ||
FASTLANE_PROVISIONING_PROFILE_SPECIFIER="match AppStore finance.get10101.app" | ||
#FASTLANE_APP_SCHEME="Runner" | ||
FASTLANE_APP_SCHEME="test" # or "Runner" | ||
FASTLANE_APPLE_ID="[email protected]" | ||
FASTLANE_TEMP_KEYCHAIN_USER="[email protected]" | ||
FASTLANE_TEMP_KEYCHAIN_PASSWORD="some-random-password" | ||
FASTLANE_APPLE_ISSUER_ID="12234124-1111-2222-3333-444444444444" | ||
FASTLANE_APPLE_KEY_ID="123456678" | ||
FASTLANE_APPLE_KEY_CONTENT="-----BEGIN PRIVATE KEY-----\....\n-----END PRIVATE KEY-----" | ||
FASTLANE_GIT_AUTHORIZATION="username:github_token" | ||
FASTLANE_APP_STORE_CONNECT_TEAM_ID=123456789 | ||
FASTLANE_DEVELOPER_PORTAL_TEAM_ID=1234567890 |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
push: | ||
branches: | ||
- "staging" | ||
- "main" | ||
# - "main" | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
|
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
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,163 @@ | ||
name: "Build and release ios app to TestFlight" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
coordinator_port_http: | ||
required: true | ||
type: string | ||
esplora_endpoint: | ||
required: true | ||
type: string | ||
coordinator_p2p_endpoint: | ||
required: true | ||
type: string | ||
network: | ||
required: true | ||
type: string | ||
description: "The target network for the release, e.g. mainnet/regtest" | ||
tag: | ||
required: true | ||
description: "The branch, tag or SHA to checkout." | ||
type: string | ||
oracle_endpoint: | ||
required: true | ||
type: string | ||
oracle_pubkey: | ||
required: true | ||
description: "The public key of the oracle. Must match with the public key returned at http://${oracle_endpoint}/oracle/publickey" | ||
type: string | ||
app_scheme: | ||
required: true | ||
description: "For regtest enter 'regtest' or mainnet enter 'Runner'" | ||
type: string | ||
fastlane_provisioning_profile_specifier: | ||
required: true | ||
description: "For regtest enter 'match AppStore finance.get10101.app.test' or mainnet enter 'match AppStore finance.get10101.app 1691412333'" | ||
type: string | ||
fastlane_developer_app_identifier: | ||
required: true | ||
description: "For regtest enter 'finance.get10101.app.test' or mainnet enter 'finance.get10101.app'" | ||
type: string | ||
workflow_dispatch: | ||
inputs: | ||
coordinator_port_http: | ||
required: true | ||
type: string | ||
esplora_endpoint: | ||
required: true | ||
type: string | ||
coordinator_p2p_endpoint: | ||
required: true | ||
type: string | ||
network: | ||
required: true | ||
type: string | ||
description: "The target network for the release, e.g. mainnet/regtest" | ||
tag: | ||
required: true | ||
description: "The branch, tag or SHA to checkout." | ||
type: string | ||
oracle_endpoint: | ||
required: true | ||
type: string | ||
oracle_pubkey: | ||
required: true | ||
description: "The public key of the oracle. Must match with the public key returned at http://${oracle_endpoint}/oracle/publickey" | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# fetch the complete history to correctly calculate build_number | ||
fetch-depth: 0 | ||
ref: ${{ inputs.tag }} | ||
|
||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: "14.2" | ||
|
||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
flutter-version: ${{ env.FLUTTER_VERSION }} | ||
architecture: x64 | ||
|
||
- uses: actions/cache@v3 | ||
id: cache-deps | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
./rust/target | ||
key: ${{ runner.os }}-cargo-build-release-ios-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install just | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
run: cargo install just | ||
|
||
- name: Install fastlane | ||
run: | | ||
cd mobile/ios/fastlane | ||
gem install bundler | ||
- name: Install FFI bindings | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
run: just deps-gen | ||
|
||
- name: Install ios dependencies | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
run: cargo install cargo-lipo | ||
|
||
- name: Set rustup targets | ||
run: rustup target add aarch64-apple-ios x86_64-apple-ios | ||
|
||
- name: Generate FFI bindings | ||
run: just gen | ||
|
||
- name: Build iOS Rust lib in release mode | ||
run: just ios-release | ||
|
||
- name: Parse version from pubspec.yaml | ||
id: version | ||
uses: jbutcher5/[email protected] | ||
with: | ||
file: "mobile/pubspec.yaml" | ||
key-path: '["version"]' | ||
|
||
- name: Build iOS Archive | ||
id: build-ios | ||
run: | | ||
NETWORK=$NETWORK just build-ipa-no-codesign | ||
env: | ||
ESPLORA_ENDPOINT: ${{ inputs.esplora_endpoint }} | ||
COORDINATOR_P2P_ENDPOINT: ${{ inputs.coordinator_p2p_endpoint }} | ||
NETWORK: ${{ inputs.network }} | ||
COORDINATOR_PORT_HTTP: ${{ inputs.coordinator_port_http }} | ||
ORACLE_ENDPOINT: ${{ inputs.oracle_endpoint }} | ||
ORACLE_PUBKEY: ${{ inputs.oracle_pubkey }} | ||
|
||
- name: Release to TestFlight | ||
env: | ||
# secrets | ||
FASTLANE_APPLE_ID: ${{ secrets.FASTLANE_APPLE_ID }} | ||
FASTLANE_APP_STORE_CONNECT_TEAM_ID: ${{ secrets.FASTLANE_APP_STORE_CONNECT_TEAM_ID }} | ||
FASTLANE_DEVELOPER_PORTAL_TEAM_ID: ${{ secrets.FASTLANE_DEVELOPER_PORTAL_TEAM_ID }} | ||
FASTLANE_DEVELOPER_APP_ID: ${{ secrets.FASTLANE_DEVELOPER_APP_ID }} | ||
FASTLANE_TEMP_KEYCHAIN_USER: ${{ secrets.FASTLANE_TEMP_KEYCHAIN_USER }} | ||
FASTLANE_TEMP_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_TEMP_KEYCHAIN_PASSWORD }} | ||
FASTLANE_APPLE_ISSUER_ID: ${{ secrets.FASTLANE_APPLE_ISSUER_ID }} | ||
FASTLANE_APPLE_KEY_ID: ${{ secrets.FASTLANE_APPLE_KEY_ID }} | ||
FASTLANE_APPLE_KEY_CONTENT: ${{ secrets.FASTLANE_APPLE_KEY_CONTENT }} | ||
FASTLANE_GIT_AUTHORIZATION: ${{ secrets.FASTLANE_GIT_AUTHORIZATION }} | ||
# inputs | ||
FASTLANE_DEVELOPER_APP_IDENTIFIER: ${{ inputs.fastlane_developer_app_identifier }} | ||
FASTLANE_PROVISIONING_PROFILE_SPECIFIER: ${{ inputs.fastlane_provisioning_profile_specifier }} | ||
FASTLANE_APP_SCHEME: ${{ inputs.app_scheme }} | ||
run: | | ||
just publish-testflight-fastlane |
Oops, something went wrong.