Skip to content

v0.35.0

v0.35.0 #121

Workflow file for this run

on:
release:
types: [published]
name: Handle Release
jobs:
upload-ios:
name: Upload dsyms
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Set release version and build number env
id: version-format
run: |
version="${github_ref#*v}"
build="${version#*-}"
version="${version%-*}"
build="${build%-*}"
version="${version%-*}"
echo $version
echo $build
echo "::set-output name=version::$version"
echo "::set-output name=build::$build"
env:
github_ref: ${{ github.ref }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v1
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install dependencies
run: yarn
- name: Compile
run: yarn compile
- uses: actions/cache@v1
with:
path: ios/vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install fastlane
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
working-directory: ios
- name: Set Release secret
run: |
mkdir -p ios/builds
echo ${{ secrets.APPLE_CONNECT_API_KEY_SECRET }} | base64 -d > ios/builds/AuthKey.p8
- name: Download and update dsyms
run: bundle exec fastlane update_dsyms
working-directory: ios
env:
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_APPLE_PASSWORD }}
APPLE_CONNECT_API_KEY_ID: ${{ secrets.APPLE_CONNECT_API_KEY_ID }}
APPLE_CONNECT_API_ISSUER_ID: ${{ secrets.APPLE_CONNECT_API_ISSUER_ID }}
VERSION_NAME: ${{ steps.version-format.outputs.version }}
BUILD_NUMBER: ${{ steps.version-format.outputs.build }}
build-android:
runs-on: ubuntu-latest
name: Create release-artifacts
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Set up JDK 1.11
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
java-package: jdk
- name: Set up Ruby 2.6
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.10
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn
- name: Compile
run: yarn compile
- name: Setup kernel for react native, increase watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- uses: actions/cache@v1
with:
path: android/vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install fastlane
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
working-directory: android
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set Release keystore
run: echo ${{ secrets.ANDROID_RELEASE_KEYSTORE }} | base64 -d > android/app/release.keystore
- name: Set sentry.properties
run: echo ${{ secrets.SENTRY_PROPERTIES }} | base64 -d > android/sentry.properties
- name: Build Release APK
run: bundle exec fastlane apk
working-directory: android
env:
SENTRY_LOAD_DOTENV: 0
ANDROID_RELEASE_KEY_STORE_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEY_STORE_PASSWORD }}
ANDROID_RELEASE_KEY_KEY_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEY_KEY_PASSWORD }}
- name: Format release url
id: url-format
run: |
RELEASE_ID=${{ github.event.release.id }}
UPLOAD_URL="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets{?name,label}"
echo "::set-output name=upload_url::$UPLOAD_URL"
- name: Set release version and build number env
id: version-format
run: |
version="${github_ref#*v}"
build="${version#*-}"
version="${version%-*}"
build="${build%-*}"
version="${version%-*}"
echo $version
echo $build
echo "::set-output name=version::$version"
env:
github_ref: ${{ github.ref }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.url-format.outputs.upload_url }}
asset_path: ./android/app/build/outputs/apk/release/app-release.apk
asset_name: liker-land-app_${{ steps.version-format.outputs.version }}.apk
asset_content_type: application/zip