chore(deps): update dependency @types/semver to v7.5.5 #384
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: Check and build for pull requests | |
on: pull_request | |
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 | |
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 | |
run: | | |
sed -i "s/signingConfigs\.release/signingConfigs\.debug/g" apps/thu-info-app/android/app/build.gradle | |
sed -i "/preventRoot/d" apps/thu-info-app/android/app/src/main/java/com/unidy2002/thuinfo/MainApplication.kt | |
sed -i "/preventEmulator/d" apps/thu-info-app/android/app/src/main/java/com/unidy2002/thuinfo/MainApplication.kt | |
sed -i "/verifySignature/d" apps/thu-info-app/android/app/src/main/java/com/unidy2002/thuinfo/MainApplication.kt | |
- name: Build android release | |
uses: gradle/gradle-build-action@v2 | |
env: | |
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 |