fix(receive sms): 55555 and +55555 service providers #5
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 / Publish Snapshot | |
on: | |
push: | |
branches: | |
- master | |
env: | |
ANDROID_ENV: "STAGING" | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
DEBUG_ENCRYPTION_KEY: ${{ secrets.DEBUG_ENCRYPTION_KEY }} | |
DEBUG_KEYSTORE_ENCRYPT_PATH: secrets/debug-keystore.jks.aes | |
DEBUG_KEYSTORE_DECRYPT_PATH: secrets/debug-keystore.jks | |
DEBUG_KEYSTORE_PASSWORD: ${{ secrets.DEBUG_KEYSTORE_PASSWORD }} | |
DEBUG_KEY_PASSWORD: ${{ secrets.DEBUG_KEY_PASSWORD }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- run: git fetch --prune --unshallow | |
- 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: Decrypt the Storage Key | |
run: | | |
openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -d -in $DEBUG_KEYSTORE_ENCRYPT_PATH -out $DEBUG_KEYSTORE_DECRYPT_PATH -k $DEBUG_ENCRYPTION_KEY | |
- name: Build Debug APK | |
run: ./gradlew assembleDebug --parallel | |
- name: Build Debug bundle | |
run: ./gradlew bundleDebug --parallel | |
- name: Cleanup secrets | |
if: always() | |
run: | | |
rm -rf secrets/*.jks | |
- name: Generate artifact name | |
env: | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_SHA: ${{ github.sha }} | |
run: | | |
echo "REPOSITORY=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)" >> $GITHUB_ENV | |
echo "VERSION=$(git describe --tags --abbrev=0 | cut -c 2-)" >> $GITHUB_ENV | |
echo "COMMIT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.REPOSITORY }}-${{ env.VERSION }}-snapshot-(${{ env.COMMIT_SHA }}) | |
path: | | |
app/build/outputs/apk/debug/*.apk | |
app/build/outputs/bundle/debug/*.aab | |
unit_tests: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- run: git fetch --prune --unshallow | |
- 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: Run Unit tests | |
run: ./gradlew testDebugUnitTest | |
- name: Android Test Report | |
uses: asadmansr/[email protected] | |
if: ${{ always() }} | |
android_tests: | |
name: Android Test | |
runs-on: macos-12 | |
needs: [build] | |
env: | |
DEBUG_ENCRYPTION_KEY: ${{ secrets.DEBUG_ENCRYPTION_KEY }} | |
DEBUG_KEYSTORE_ENCRYPT_PATH: secrets/debug-keystore.jks.aes | |
DEBUG_KEYSTORE_DECRYPT_PATH: secrets/debug-keystore.jks | |
DEBUG_KEYSTORE_PASSWORD: ${{ secrets.DEBUG_KEYSTORE_PASSWORD }} | |
DEBUG_KEY_PASSWORD: ${{ secrets.DEBUG_KEY_PASSWORD }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- run: git fetch --prune --unshallow | |
- 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: Decrypt the Storage Key | |
run: | | |
openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -d -in $DEBUG_KEYSTORE_ENCRYPT_PATH -out $DEBUG_KEYSTORE_DECRYPT_PATH -k $DEBUG_ENCRYPTION_KEY | |
- name: Run Instrumented tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
script: ./gradlew connectedDebugAndroidTest | |
- name: Cleanup secrets | |
if: always() | |
run: | | |
rm -rf secrets/*.jks |