publish sample application #15
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: publish sample application | |
on: | |
workflow_dispatch: | |
inputs: | |
platform: | |
description: 'Select target platform' | |
required: true | |
type: choice | |
options: | |
- All | |
- Android | |
- iOS | |
version: | |
description: 'version (optional)' | |
required: false | |
type: string | |
default: '' | |
jobs: | |
execute: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
- name: '[${{ github.event.inputs.platform }}] Deploy trigger' | |
if: ${{github.event.inputs.platform}} | |
uses: promiseofcake/circleci-trigger-action@v1 | |
with: | |
user-token: ${{ secrets.CIRCLECI_PERSONAL_API_TOKEN }} | |
project-slug: sendbird/sendbird-uikit-react-native | |
branch: ${{ env.BRANCH_NAME }} | |
payload: '{"platform": "${{ github.event.inputs.platform }}", "version": "${{ github.event.inputs.version }}" }' | |
#env: | |
# CACHE_NODE_MODULES_PATH: | | |
# node_modules | |
# packages/*/node_modules | |
# sample/node_modules | |
# | |
#jobs: | |
# deploy-android: | |
# name: '[Android] Deploy' | |
# if: ${{ github.event.inputs.platform == 'Android' || github.event.inputs.platform == 'All' }} | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-node@v1 | |
# with: | |
# node-version: 16.x | |
# - uses: ruby/setup-ruby@v1 | |
# env: | |
# BUNDLE_GEMFILE: ${{ github.workspace }}/sample/android/Gemfile | |
# with: | |
# ruby-version: 2.7 | |
# bundler-cache: true | |
# - name: Get lockfile hash | |
# id: lockfile_hash | |
# run: echo "::set-output name=hash::${{ hashFiles('**/yarn.lock') }}" | |
# - name: Check cached node_modules | |
# id: check_cache | |
# uses: actions/cache@v2 | |
# with: | |
# path: ${{ env.CACHE_NODE_MODULES_PATH }} | |
# key: ${{ steps.lockfile_hash.outputs.hash }} | |
# - name: Install dependencies | |
# if: steps.check_cache.outputs.cache-hit == '' | |
# run: yarn install --frozen-lockfile | |
# - name: Create env.ts | |
# run: | |
# echo "export const APP_ID = '${{ secrets.sendbird_app_id }}';" >> sample/src/env.ts | |
# | |
# - name: Create service-account.json | |
# uses: /bang9/create-env-json@v3 | |
# id: service-account | |
# with: | |
# file-name: './sample/android/fastlane/service-account.json' | |
# type: 'service_account' | |
# auth_uri: 'https://accounts.google.com/o/oauth2/auth' | |
# token_uri: 'https://oauth2.googleapis.com/token' | |
# auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs' | |
# project_id: ${{ secrets.fastlane_android_account_project_id }} | |
# private_key_id: ${{ secrets.fastlane_android_account_private_key_id }} | |
# private_key: '${{ secrets.fastlane_android_account_private_key }}' | |
# client_email: ${{ secrets.fastlane_android_account_client_email }} | |
# client_id: ${{ secrets.fastlane_android_account_client_id }} | |
# client_x509_cert_url: ${{ secrets.fastlane_android_account_client_x509_cert_url }} | |
# - name: Run fastlane | |
# env: | |
# FIREBASEAPPDISTRO_APP: ${{ secrets.fastlane_android_app_id }} | |
# GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.service-account.outputs.full-path }} | |
# run: yarn deploy:android | |
# | |
# deploy-ios: | |
# name: '[iOS] Deploy' | |
# if: ${{ github.event.inputs.platform != 'Android' }} | |
# runs-on: macos-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-node@v1 | |
# with: | |
# node-version: 16.x | |
# - uses: ruby/setup-ruby@v1 | |
# env: | |
# BUNDLE_GEMFILE: ${{ github.workspace }}/sample/ios/Gemfile | |
# with: | |
# ruby-version: 2.7 | |
# bundler-cache: true | |
# - name: Get lockfile hash | |
# id: lockfile_hash | |
# run: echo "::set-output name=hash::${{ hashFiles('**/yarn.lock') }}" | |
# - name: Check cached node_modules | |
# id: check_cache | |
# uses: actions/cache@v2 | |
# with: | |
# path: ${{ env.CACHE_NODE_MODULES_PATH }} | |
# key: ${{ steps.lockfile_hash.outputs.hash }} | |
# - name: Install dependencies | |
# if: steps.check_cache.outputs.cache-hit == '' | |
# run: | |
# yarn install --frozen-lockfile | |
# - name: Install pods | |
# run: cd sample/ios && pod install | |
# - name: Create env.ts | |
# run: | |
# echo "export const APP_ID = '${{ secrets.sendbird_app_id }}';" >> sample/src/env.ts | |
# - name: Run fastlane | |
# env: | |
# TEAM_ID: ${{ secrets.fastlane_ios_team_id }} | |
# MATCH_PASSWORD: ${{ secrets.fastlane_ios_match_password }} | |
# MATCH_GIT_URL: ${{ secrets.fastlane_ios_match_git_url }} | |
# MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.fastlane_ios_match_git_basic_authorization }} | |
# APPLE_ID: ${{ secrets.fastlane_ios_apple_id }} | |
# FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.fastlane_ios_apple_application_specific_password }} | |
# run: yarn deploy:ios |