fix(deps): update dependency react-native to v0.76.5 #7798
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: Build Android and iOS | |
on: push | |
jobs: | |
install-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Setup caching | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: cache-${{ runner.OS }}-${{ hashFiles('**/*.lock') }} | |
restore-keys: | | |
cache-${{ runner.OS }}- | |
- name: Install dependencies | |
run: | | |
yarn | |
- name: Run tests | |
run: | | |
yarn workspace @thu-info/app lint | |
yarn workspace @thu-info/app test | |
build-android: | |
needs: install-and-test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "corretto" | |
java-version: "17" | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Setup caching | |
if: startsWith(github.ref, 'refs/tags') == false | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: cache-${{ runner.OS }}-${{ hashFiles('**/*.lock') }} | |
restore-keys: | | |
cache-${{ runner.OS }}- | |
- name: Install dependencies | |
run: | | |
yarn | |
- name: Prepare for building | |
env: | |
SECRET_PASSWORD: ${{ secrets.SECRET_PASSWORD }} | |
run: | | |
openssl aes-256-cbc -k "$SECRET_PASSWORD" -in apps/thu-info-app/android/app/THUInfo.jks.enc -out apps/thu-info-app/android/app/THUInfo.jks -d | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
build-root-directory: apps/thu-info-app/android | |
- name: Build android release | |
env: | |
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }} | |
SIGNATURE_DIGEST: ${{ secrets.SIGNATURE_DIGEST }} | |
run: | | |
cd apps/thu-info-app/android && ./gradlew assembleRelease && cd ../../.. | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-release.apk | |
path: apps/thu-info-app/android/app/build/outputs/apk/release/app-release.apk | |
- name: Prepare for release | |
id: prepare_release | |
if: startsWith(github.ref, 'refs/tags') | |
run: | | |
export ref='${{ github.ref }}' | |
export tag=${ref:10} | |
echo "::set-output name=tag::$tag" | |
mv apps/thu-info-app/android/app/build/outputs/apk/release/app-release.apk THUInfo_release_${tag}.apk | |
- name: Prepare for building (allow rooted) | |
run: | | |
sed -i "/preventRoot/d" apps/thu-info-app/android/app/src/main/java/com/unidy2002/thuinfo/MainApplication.kt | |
- name: Build android release (allow rooted) | |
env: | |
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }} | |
SIGNATURE_DIGEST: ${{ secrets.SIGNATURE_DIGEST }} | |
run: | | |
cd apps/thu-info-app/android && ./gradlew assembleRelease && cd ../../.. | |
- name: Upload artifact (allow rooted) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-release-allow-rooted.apk | |
path: apps/thu-info-app/android/app/build/outputs/apk/release/app-release.apk | |
- name: Prepare for release (allow rooted) | |
if: startsWith(github.ref, 'refs/tags') | |
run: | | |
export ref='${{ github.ref }}' | |
export tag=${ref:10} | |
mv apps/thu-info-app/android/app/build/outputs/apk/release/app-release.apk THUInfo_release_${tag}_allow_rooted.apk | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags') | |
uses: softprops/action-gh-release@v2 | |
with: | |
body_path: ./release-notes.md | |
files: | | |
THUInfo_release_${{ steps.prepare_release.outputs.tag }}.apk | |
THUInfo_release_${{ steps.prepare_release.outputs.tag }}_allow_rooted.apk | |
build-ios: | |
needs: install-and-test | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Setup caching | |
if: startsWith(github.ref, 'refs/tags') == false | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
apps/thu-info-app/ios/Pods | |
vendor/bundle | |
key: cache-${{ runner.OS }}-${{ hashFiles('**/*.lock') }} | |
restore-keys: | | |
cache-${{ runner.OS }}- | |
- name: Setup ccache | |
if: startsWith(github.ref, 'refs/tags') == false | |
uses: hendrikmuhs/ccache-action@main | |
- name: Install dependencies | |
run: | | |
yarn | |
bundle install | |
cd apps/thu-info-app/ios && bundle exec pod update hermes-engine boost RCT-Folly SocketRocket && bundle exec pod install && cd ../../.. | |
- name: Commit lockfile changes | |
if: endsWith(github.ref, 'master') == true | |
continue-on-error: true | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add Gemfile.lock apps/thu-info-app/ios/Podfile.lock | |
git commit -m "chore: lockfile maintenance" | |
- name: Push lockfile changes | |
if: endsWith(github.ref, 'master') == true | |
uses: ad-m/github-push-action@master | |
with: | |
branch: ${{ github.ref }} | |
continue-on-error: true | |
- name: SSH setting up | |
run: | | |
echo "${{ secrets.CERTIFICATE_REPO_PRIVATE_KEY }}" | tr -d "\r" | ssh-add - > /dev/null | |
- name: Update beta | |
run: cd apps/thu-info-app/ios && fastlane beta | |
env: | |
MATCH_PASSWORD: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | |
APPSTORE_API_PRIVATE_KEY: ${{ secrets.APPSTORE_API_PRIVATE_KEY }} | |
APPSTORE_API_PRIVATE_KEY_ID: ${{ secrets.APPSTORE_API_PRIVATE_KEY_ID }} | |
APPSTORE_ISSUER_ID: ${{ secrets.APPSTORE_ISSUER_ID }} | |
CCACHE_SLOPPINESS: "clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros" | |
CCACHE_FILECLONE: "true" | |
CCACHE_DEPEND: "true" | |
CCACHE_INODECACHE: "true" | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: thu_info.ipa | |
path: apps/thu-info-app/ios/thu_info.ipa |