Skip to content

chore(deps): update typescript-eslint monorepo to v6.11.0 #5522

chore(deps): update typescript-eslint monorepo to v6.11.0

chore(deps): update typescript-eslint monorepo to v6.11.0 #5522

Workflow file for this run

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@v3
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@v3
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@v3
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: Build android release
uses: gradle/gradle-build-action@v2
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 }}
with:
arguments: assembleRelease
build-root-directory: apps/thu-info-app/android
- name: Upload artifact
uses: actions/upload-artifact@v3
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)
uses: gradle/gradle-build-action@v2
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 }}
with:
arguments: assembleRelease
build-root-directory: apps/thu-info-app/android
- name: Upload artifact (allow rooted)
uses: actions/upload-artifact@v3
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@v1
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-latest
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@v3
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: Install dependencies
run: |
yarn
bundle install
cd apps/thu-info-app/ios && pod update hermes-engine --no-repo-update && 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 }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: thu_info.ipa
path: apps/thu-info-app/ios/thu_info.ipa