[Student] Hotfix Not Request Url From Wakeup Song #367
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: Android CI | |
on: | |
pull_request: | |
branches: [ "develop", "main" ] | |
jobs: | |
build: | |
env: | |
TITLE: ${{ github.event.pull_request.title }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Validate Pull Request Title | |
id: validate-title | |
run: | | |
if [[ "${{ env.TITLE }}" == "[Student]"* ]]; then | |
echo "target=student" >> $GITHUB_ENV | |
elif [[ "${{ env.TITLE }}" == "[Teacher]"* ]]; then | |
echo "target=teacher" >> $GITHUB_ENV | |
elif [[ "${{ env.TITLE }}" == "[Core]"* ]]; then | |
echo "target=core" >> $GITHUB_ENV | |
else | |
echo "::error::Invalid PR title: '${{ env.TITLE }}'. Must start with [Student], [Teacher], or [Core]." | |
exit 1 | |
fi | |
- name: Run Student spotless | |
if: env.target == 'student' | |
run: ./gradlew dodam-student:spotlessCheck | |
- name: Android Student Build with Gradle | |
if: env.target == 'student' | |
run: ./gradlew dodam-student:clean assembleRelease --parallel | |
- name: Run Teacher spotless | |
if: env.target == 'teacher' | |
run: ./gradlew dodam-teacher-android:spotlessCheck | |
- name: Android Teacher Build with Gradle | |
if: env.target == 'teacher' | |
run: ./gradlew dodam-teacher-android:clean assembleRelease --parallel | |
- name: Android Core Build with Gradle | |
if: env.target == 'core' | |
run: ./gradlew spotlessCheck | |
- name: Android Core Build with Gradle | |
if: env.target == 'core' | |
run: | | |
./gradlew dodam-teacher-android:clean assembleRelease --parallel | |
./gradlew dodam-student:assembleRelease --parallel |