Student 3.4.2 #25
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: Android Release CD | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
release: | |
env: | |
TITLE: ${{ github.event.release.name }} | |
CONTENT: ${{ github.event.release.body }} | |
KEYSTORE: ${{ secrets.DODAM_KEYSTORE }} | |
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: Generate Keystore File | |
run: | | |
echo '${{ env.KEYSTORE }}' | base64 --d > ./dodam.jks | |
ls | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Run Student spotless | |
if: ${{ startsWith(env.TITLE, 'Student') || startsWith(env.TITLE, 'Total')}} | |
run: ./gradlew dodam-student:spotlessCheck | |
- name: Run Teacher spotless | |
if: ${{ startsWith(env.TITLE, 'Teacher') || startsWith(env.TITLE, 'Total')}} | |
run: ./gradlew dodam-teacher-android:spotlessCheck | |
- name: Assemble Student Release Bundle | |
if: ${{ startsWith(env.TITLE, 'Student') || startsWith(env.TITLE, 'Total')}} | |
run: ./gradlew dodam-student:bundleRelease | |
- name: Assemble Teacher Release Bundle | |
if: ${{ startsWith(env.TITLE, 'Teacher') || startsWith(env.TITLE, 'Total')}} | |
run: ./gradlew dodam-teacher-android:bundleRelease | |
- name: Sign Student Release | |
if: ${{ startsWith(env.TITLE, 'Student') || startsWith(env.TITLE, 'Total')}} | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: ./dodam-student/build/outputs/bundle/release | |
signingKeyBase64: ${{ secrets.DODAM_KEYSTORE }} | |
keyStorePassword: ${{ secrets.DODAM_KEYSTORE_PASSWORD }} | |
alias: ${{ secrets.DODAM_KEYSTORE_ALIAS }} | |
keyPassword: ${{ secrets.DODAM_KEYSTORE_PASSWORD }} | |
- name: Sign Teacher Release | |
if: ${{ startsWith(env.TITLE, 'Teacher') || startsWith(env.TITLE, 'Total')}} | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: ./dodam-teacher-android/build/outputs/bundle/release | |
signingKeyBase64: ${{ secrets.DODAM_KEYSTORE }} | |
keyStorePassword: ${{ secrets.DODAM_KEYSTORE_PASSWORD }} | |
alias: ${{ secrets.DODAM_KEYSTORE_ALIAS }} | |
keyPassword: ${{ secrets.DODAM_KEYSTORE_PASSWORD }} | |
- name: Setup Authorization With Google Play Store | |
run: echo '${{ secrets.DODAM_GOOGLE_PLAY_API_AUTH }}' > service_account.json | |
- name: Student Patch Note Body Parsing | |
if: ${{ startsWith(env.TITLE, 'Student') || startsWith(env.TITLE, 'Total')}} | |
uses: Team-B1ND/string-parser@main | |
with: | |
body: ${{ env.CONTENT }} | |
split: "<Teacher>" | |
splitIndex: 0 | |
replaceBefore: "<Student>\n" | |
replaceAfter: "" | |
envName: Student | |
- name: Teacher Patch Note Body Parsing | |
if: ${{ startsWith(env.TITLE, 'Teacher') || startsWith(env.TITLE, 'Total')}} | |
uses: Team-B1ND/string-parser@main | |
with: | |
body: ${{ env.CONTENT }} | |
split: "<Teacher>" | |
splitIndex: 1 | |
substringStart: 1 | |
envName: Teacher | |
- name: Prepare Student Patch Notes | |
if: ${{ startsWith(env.TITLE, 'Student') || startsWith(env.TITLE, 'Total')}} | |
run: | | |
mkdir -p whatsNewDirectory | |
echo "create patch note: ${{ env.Student }}" | |
echo "${{ env.Student }}" > whatsNewDirectory/whatsnew-ko-KR | |
- name: Student Dodam Deploy to Production Channel | |
if: ${{ startsWith(env.TITLE, 'Student') || startsWith(env.TITLE, 'Total')}} | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJson: service_account.json | |
packageName: com.b1nd.dodam.student | |
releaseFiles: ./dodam-student/build/outputs/bundle/release/dodam-student-release.aab | |
track: production | |
status: completed | |
inAppUpdatePriority: 2 | |
whatsNewDirectory: whatsNewDirectory/ | |
- name: Prepare Student Patch Notes | |
if: ${{ startsWith(env.TITLE, 'Teacher') || startsWith(env.TITLE, 'Total')}} | |
run: | | |
mkdir -p whatsNewDirectory | |
echo "create patch note: ${{ env.Teacher }}" | |
echo "${{ env.Teacher }}" > whatsNewDirectory/whatsnew-ko-KR | |
- name: Teacher Dodam Deploy to Production Channel | |
if: ${{ startsWith(env.TITLE, 'Teacher') || startsWith(env.TITLE, 'Total')}} | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJson: service_account.json | |
packageName: com.b1nd.dodam.teacher | |
releaseFiles: ./dodam-teacher-android/build/outputs/bundle/release/dodam-teacher-android-release.aab | |
track: production | |
status: completed | |
inAppUpdatePriority: 2 | |
whatsNewDirectory: whatsNewDirectory/ | |