release-ios-debug #21
Workflow file for this run
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
name: release-ios-debug | |
on: | |
workflow_dispatch: | |
inputs: | |
is-split-bundle: | |
description: "Should it run as split-bundle? (keep it null if you don't need it)" | |
required: false | |
default: '' | |
jobs: | |
release-ios-debug: | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
node-version: [20.x] | |
ruby-version: [2.7.x] | |
xcode-version: [15.3] | |
steps: | |
- name: Checkout Source Code | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Dotenv Action | |
id: dotenv | |
uses: OneKeyHQ/actions/dotenv-action@main | |
with: | |
path: .env.version | |
- name: 'Setup ENV' | |
run: | | |
echo "ActionTriggerBy = ${{ github.event.action }} / ${{ github.event_name }}" | |
# Generate build number ------- start | |
DATE=`date "+%Y%m%d"` | |
run_number=$(($workflow_run_number % 100)) | |
run_number=$(printf "%02d" $run_number) | |
build_number="${DATE}${run_number}" | |
echo '$build_number='$build_number | |
echo "BUILD_NUMBER=$build_number" >> $GITHUB_ENV | |
# Generate build number ------- end | |
github_ref="${github_ref////-}" | |
github_ref="${github_ref/refs-heads-/}" | |
github_ref="${github_ref/refs-tags-/}" | |
echo '$github_ref='$github_ref | |
echo "GITHUB_TAG=$github_ref" >> $GITHUB_ENV | |
# echo "::set-env name=GITHUB_TAG::$github_ref" | |
env: | |
github_ref: ${{ github.ref }} | |
workflow_run_number: ${{ github.event.workflow_run.run_number}} | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://npm.pkg.github.com' | |
always-auth: true | |
scope: '@onekeyhq' | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Show SDKs | |
run: | | |
xcodebuild -showsdks | |
- name: Install Dep | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_OPTIONS: '--max_old_space_size=8192' | |
run: | | |
yarn | |
- name: Install Pods | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_OPTIONS: '--max_old_space_size=8192' | |
run: | | |
cd apps/mobile/ios | |
gem install cocoapods -v 1.15.2 | |
pod install | |
- name: Inject Environment Variables | |
env: | |
GITHUB_SHA: ${{ github.sha }} | |
run: | | |
echo "GITHUB_SHA=${{ env.GITHUB_SHA }}" >> .env | |
- name: Build App File | |
env: | |
NODE_OPTIONS: '--max_old_space_size=8192' | |
run: | | |
yarn app:web-embed:build | |
cd apps/mobile/ios | |
xcodebuild -workspace OneKeyWallet.xcworkspace -configuration Debug -scheme OneKeyWallet -sdk iphonesimulator -derivedDataPath ./outputs | |
- name: Zip artifact | |
run: | | |
cd apps/mobile/ios/outputs/Build/Products/Debug-iphonesimulator | |
zip OneKeyWallet-Debug.zip OneKeyWallet.app/* -r | |
- name: Upload App File | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-App-debug | |
path: | | |
./apps/mobile/ios/outputs/Build/Products/Debug-iphonesimulator/OneKeyWallet-Debug.zip | |
if-no-files-found: error | |