Feature Test #607
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: Feature Test | |
on: | |
# push: | |
# branches: | |
# - feat/* | |
# workflow_call: | |
workflow_dispatch: | |
inputs: | |
REALLY_UPLOAD: | |
required: true | |
type: boolean | |
default: true | |
SENTRY_DISABLE_AUTO_UPLOAD: | |
required: false | |
type: boolean | |
default: false | |
defaults: | |
run: | |
shell: bash -ieol pipefail {0} | |
jobs: | |
setup: | |
name: Build | |
strategy: | |
matrix: | |
host: | |
- macOS | |
- Linux | |
runs-on: | |
- self-hosted | |
- mobile | |
- ${{ matrix.host }} | |
env: | |
NODE_OPTIONS: '--max_old_space_size=4096' | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v3 | |
- name: Env Test | |
id: env-test | |
run: | | |
echo "whoami $(whoami)" | |
echo "shell is $(echo $0)" | |
echo "HOME is $HOME" | |
echo "which node $(which node)" | |
- name: '[Linux] Setup Nodejs and Yarn' | |
if: runner.os == 'Linux' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: '[Linux] Setup Ruby & Fastlane' | |
if: runner.os == 'Linux' | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7.2' | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: '[Linux] Setup Java' | |
if: runner.os == 'Linux' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' # See 'Supported distributions' for available options | |
java-version: '17' | |
- name: '[Linux] Setup Android SDK' | |
if: runner.os == 'Linux' | |
uses: android-actions/setup-android@v3 | |
- name: '[macOS] Setup Xcode' | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
id: setup-xcode | |
with: | |
# use specific version rather than 'latest-stable' if multiple Xcodes installed | |
xcode-version: '15.3' | |
- name: Install and build | |
run: | | |
echo "REALLY_UPLOAD value: $REALLY_UPLOAD"; | |
cd apps/mobile; | |
rm -rf node_modules; | |
yarn install; | |
bundle install; | |
OS_TYPE=$(uname -s); | |
echo "OS_TYPE is $OS_TYPE"; | |
if [ "$OS_TYPE" == "Linux" ]; then | |
buildchannel=selfhost-reg ./scripts/deploy-android.sh | |
elif [ "$OS_TYPE" == "Darwin" ]; then | |
security unlock-keychain -p ${{ secrets.KEYCHAIN_PASS }} login.keychain | |
# cd ios && bundle install && bundle exec pod install --deployment; | |
# cd ../; | |
./scripts/deploy-ios-adhoc.sh | |
fi | |
env: | |
KEYCHAIN_PASS: ${{ secrets.KEYCHAIN_PASS }} | |
RABBY_MOBILE_BUILD_BUCKET: ${{ secrets.RABBY_MOBILE_BUILD_BUCKET }} | |
RABBY_MOBILE_KR_PWD: ${{ secrets.RABBY_MOBILE_KR_PWD }} | |
RABBY_MOBILE_CODE: ${{ secrets.RABBY_MOBILE_CODE2 }} | |
RABBY_MOBILE_ANDROID_KEY_STORE: ${{ secrets.RABBY_MOBILE_ANDROID_KEY_STORE }} | |
RABBY_MOBILE_ANDROID_KEY_PASSWORD: ${{ secrets.RABBY_MOBILE_ANDROID_KEY_PASSWORD }} | |
RABBY_MOBILE_ANDROID_KEY_ALIAS: ${{ secrets.RABBY_MOBILE_ANDROID_KEY_ALIAS }} | |
RABBY_MOBILE_SENTRY_AUTH_TOKEN2: ${{ secrets.RABBY_MOBILE_SENTRY_AUTH_TOKEN2 }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.RABBY_MOBILE_SENTRY_AUTH_TOKEN2 }} | |
MATCH_PASSWORD: ${{ secrets.RABBY_MOBILE_MATCH_PASSWORD }} | |
REALLY_UPLOAD: ${{ inputs.REALLY_UPLOAD }} | |
SENTRY_DISABLE_AUTO_UPLOAD: ${{ inputs.SENTRY_DISABLE_AUTO_UPLOAD }} | |
CONFIGURATION: release | |
TYPE: adhoc | |
BUILD_ENV: alpha | |
LARK_CHAT_URL: ${{ secrets.LARK_CHAT_URL }} | |
LARK_CHAT_SECRET: ${{ secrets.LARK_CHAT_SECRET }} | |
RABBY_ROBOT_LARK_APP_ID: ${{ secrets.RABBY_ROBOT_LARK_APP_ID }} | |
RABBY_ROBOT_LARK_APP_SECRET: ${{ secrets.RABBY_ROBOT_LARK_APP_SECRET }} | |
# see more details on https://docs.github.com/en/actions/learn-github-actions/contexts#github-context | |
GIT_ACTIONS_JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_TRIGGERING_ACTOR: ${{ github.triggering_actor }} | |
GIT_COMMIT_URL: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} | |
GIT_REF_NAME: ${{ github.ref_name }} | |
GIT_REF_URL: ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }} | |
GITHUB_REF: ${{ github.ref }} | |
# - name: Upload artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: rabbymobile-${{ steps.actionvars.outputs.flatten_refname }}-${{ steps.actionvars.outputs.trigger_date }} | |
# path: | | |
# ./apps/mobile/android/app/build/outputs/apk/regression/release/app-regression-release.apk | |
# ./apps/mobile/ios/Package/adhoc/*.ipa | |
# ./apps/mobile/ios/Package/adhoc/manifest.plist | |
# ./apps/mobile/ios/Package/adhoc/*.zip | |
# retention-days: 7 |