mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 15:36:59 +01:00
140 lines
4.6 KiB
YAML
140 lines
4.6 KiB
YAML
|
name: BuildReleaseTestflight
|
||
|
on: [pull_request]
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
runs-on: macos-latest-xl
|
||
|
timeout-minutes: 180
|
||
|
env:
|
||
|
APPLE_ID: ${{ secrets.APPLE_ID }} # Setting the environment variable
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
|
||
|
- uses: maxim-lobanov/setup-xcode@v1
|
||
|
with:
|
||
|
xcode-version: latest-stable
|
||
|
|
||
|
- name: Cache Ruby Gems
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: vendor/bundle
|
||
|
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-gem-
|
||
|
|
||
|
- name: Cache CocoaPods
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: ios/Pods
|
||
|
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-pods-
|
||
|
|
||
|
- name: Set up Ruby
|
||
|
uses: ruby/setup-ruby@v1
|
||
|
with:
|
||
|
bundler-cache: true
|
||
|
|
||
|
- name: Install dependencies with Bundler
|
||
|
run: bundle install
|
||
|
|
||
|
- name: Install Fastlane 2.217.0
|
||
|
run: gem install fastlane -v 2.217.0
|
||
|
|
||
|
- name: Install CocoaPods
|
||
|
run: sudo gem install cocoapods
|
||
|
|
||
|
- name: Use npm caches
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: ~/.npm
|
||
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-npm-
|
||
|
|
||
|
|
||
|
# Very slow.
|
||
|
# - name: Use node_modules caches
|
||
|
# id: cache-nm
|
||
|
# uses: actions/cache@v2
|
||
|
# with:
|
||
|
# path: node_modules
|
||
|
# key: ${{ runner.os }}-nm-${{ hashFiles('package-lock.json') }}
|
||
|
|
||
|
- name: Install node_modules
|
||
|
if: steps.cache-nm.outputs.cache-hit != 'true'
|
||
|
run: npm install
|
||
|
|
||
|
- name: Set up Git Authentication
|
||
|
env:
|
||
|
ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
|
||
|
run: |
|
||
|
git config --global credential.helper 'cache --timeout=3600'
|
||
|
git config --global http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n x-access-token:${ACCESS_TOKEN} | base64)"
|
||
|
|
||
|
- name: Create Temporary Keychain
|
||
|
run: bundle exec fastlane ios create_temp_keychain
|
||
|
working-directory: ./ios
|
||
|
env:
|
||
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||
|
|
||
|
- name: Setup Provisioning Profiles
|
||
|
env:
|
||
|
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||
|
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.GIT_ACCESS_TOKEN }}
|
||
|
GIT_URL: ${{ secrets.GIT_URL }}
|
||
|
ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }}
|
||
|
ITC_TEAM_NAME: ${{ secrets.ITC_TEAM_NAME }}
|
||
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||
|
run: bundle exec fastlane ios setup_provisioning_profiles
|
||
|
working-directory: ./ios
|
||
|
|
||
|
- name: Clear Derived Data
|
||
|
run: bundle exec fastlane ios clear_derived_data_lane
|
||
|
working-directory: ./ios
|
||
|
|
||
|
- name: Increment Build Number
|
||
|
run: bundle exec fastlane ios increment_build_number_lane
|
||
|
working-directory: ./ios
|
||
|
|
||
|
- name: Install CocoaPods Dependencies
|
||
|
run: bundle exec fastlane ios install_pods
|
||
|
working-directory: ./ios
|
||
|
|
||
|
- name: Build App
|
||
|
run: bundle exec fastlane ios build_app_lane
|
||
|
working-directory: ./ios
|
||
|
|
||
|
- name: Decode and Save API Key
|
||
|
env:
|
||
|
APP_STORE_CONNECT_API_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_API_KEY_CONTENT }}
|
||
|
run: |
|
||
|
echo -n "${APP_STORE_CONNECT_API_KEY_CONTENT}" | base64 -d > ios/appstore_api_key.p8
|
||
|
export APP_STORE_CONNECT_API_KEY_PATH=$(pwd)/ios/appstore_api_key.p8
|
||
|
echo $APP_STORE_CONNECT_API_KEY_PATH
|
||
|
|
||
|
- name: Upload to TestFlight
|
||
|
env:
|
||
|
APP_STORE_CONNECT_API_KEY_PATH: $(pwd)/ios/appstore_api_key.p8
|
||
|
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||
|
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.GIT_ACCESS_TOKEN }}
|
||
|
GIT_URL: ${{ secrets.GIT_URL }}
|
||
|
ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }}
|
||
|
ITC_TEAM_NAME: ${{ secrets.ITC_TEAM_NAME }}
|
||
|
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
|
||
|
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
|
||
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||
|
run: bundle exec fastlane ios upload_to_testflight_lane
|
||
|
working-directory: ./ios
|
||
|
|
||
|
- name: Clean Build Artifacts
|
||
|
run: bundle exec fastlane ios clean_build_artifacts_lane
|
||
|
working-directory: ./ios
|
||
|
|
||
|
- name: Upload Fastlane logs as Artifact
|
||
|
if: always()
|
||
|
uses: actions/upload-artifact@v2
|
||
|
with:
|
||
|
name: fastlane-logs
|
||
|
path: fastlane.log
|