Skip to content

[WIP]build: support github actions. #1

[WIP]build: support github actions.

[WIP]build: support github actions. #1

Workflow file for this run

name: Build and deploy iOS alpha
on:
push:
tags:
- 'ios-alpha-*'
branches:
- 'ci/ios-alpha-*'
- ci/*
workflow_dispatch:
workflow_call:
secrets:
MATCH_GIT_PRIVATE_KEY:
required: true
MATCH_PASSWORD:
required: true
NPM_AUTH_TOKEN:
required: true
defaults:
run:
shell: bash -ieo pipefail {0}
env:
BUILD_TARGET_PLATFORM: ios
jobs:
setup:
name: iOS-alpha-build
runs-on: [self-hosted, mobile, macOS]
defaults:
run:
shell: bash -ieo pipefail {0}
steps:
- uses: actions/checkout@v4
- name: Get Actions Variables
id: actionvars
shell: bash
run: |
trigger_date=$(date +'%Y%m%d%H%M%S')
echo "trigger_date=$trigger_date" >> "$GITHUB_OUTPUT"
flatten_refname=${GITHUB_REF_NAME//\//'_'}
flatten_refname=${flatten_refname//\./'_'}
echo "flatten_refname=$flatten_refname" >> "$GITHUB_OUTPUT"
# - name: Setup Nodejs and Yarn
# uses: actions/setup-node@v3
# with:
# node-version: 18
# - name: Setup Ruby & Fastlane
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: '2.7'
# bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- 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 dependencies
run: |
yarn --version;
cd ./apps/mobile;
yarn install;
cd ios;
bundle install && bundle exec pod install;
- name: Build app
env:
RABBY_MOBILE_BUILD_BUCKET: ${{ secrets.RABBY_MOBILE_BUILD_BUCKET }}
RABBY_MOBILE_KR_PWD: ${{ secrets.RABBY_DESKTOP_KR_PWD }}
RABBY_MOBILE_SENTRY_AUTH_TOKEN: ${{ secrets.RABBY_MOBILE_SENTRY_AUTH_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.RABBY_MOBILE_SENTRY_AUTH_TOKEN }}
CONFIGURATION: release
TYPE: adhoc
BUILD_ENV: alpha
LARK_CHAT_URL: ${{ secrets.LARK_CHAT_URL }}
LARK_CHAT_SECRET: ${{ secrets.LARK_CHAT_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 }}
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 }}
run: |
cd apps/mobile;
bundle exec fastlane ios alpha
# - name: copy dest
# run: |
# cp ./ios/Package/rabbymobile.ipa ./ios/outputs/RabbyMobile.ipa
# cp ./ios/Package/manifest.plist ./ios/outputs/manifest.plist
# - name: Upload app
# run: aws s3 cp ./ios/outputs s3://${BUILD_BUCKET}/downloads/debank-app/ --recursive --acl public-read