Skip to content

fix: parsing the links with unconventional tlds (#2241) #698

fix: parsing the links with unconventional tlds (#2241)

fix: parsing the links with unconventional tlds (#2241) #698

name: sample-distribution
concurrency:
group: sample-distribution-${{ github.ref }}
cancel-in-progress: true
on:
push:
paths:
- '.github/workflows/sample-distribution.yml'
- 'package/**'
- 'packages/examples/SampleApp/**'
jobs:
build_and_deploy_ios_testflight_qa:
name: Build SampleApp iOS and Deploy-${{ github.ref == 'refs/heads/develop' }}
runs-on: [macos-12]
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.DOCUSAURUS_GH_TOKEN }}
- name: Install Ruby and Gems
uses: ruby/setup-ruby@v1
with:
working-directory: examples/SampleApp
bundler-cache: true
- name: Install && Build - SDK and Sample App
uses: ./.github/actions/install-and-build-sdk
- name: Cache iOS pods
uses: actions/cache@v2
with:
path: examples/SampleApp/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('examples/SampleApp/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: iOS Pods setup
uses: nick-invision/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: |
cd examples/SampleApp
cd ios
bundle exec pod install
- name: Build and release Testflight QA
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
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 }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
run: |
cd examples/SampleApp
bundle exec fastlane deploy_to_testflight_qa deploy:${{ github.ref == 'refs/heads/develop' }};
build_and_deploy_android_s3:
name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
check-latest: true
- name: Install && Build - SDK and Sample App
uses: ./.github/actions/install-and-build-sdk
- name: Build
run: |
cd examples/SampleApp
mkdir android/app/src/main/assets
mkdir tmp
yarn react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest tmp
cd android
rm -rf $HOME/.gradle/caches/ && ./gradlew assembleRelease
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
if: ${{ github.ref == 'refs/heads/develop' }}
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload APK
if: ${{ github.ref == 'refs/heads/develop' }}
# https://getstream.io/downloads/rn-sample-app.apk
run: |
cp examples/SampleApp/android/app/build/outputs/apk/release/app-release.apk rn-sample-app.apk
aws s3 cp rn-sample-app.apk s3://${{ secrets.AWS_S3_BUCKET }} --sse AES256