Filtered translations from ff744f576e34bd005cee38e2fa169a0615e72048 #1415
This file contains hidden or 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: | |
| push: | |
| branches: [ "beta" ] | |
| paths-ignore: | |
| - ".github/**" | |
| - "!.github/workflows/**" | |
| - ".idea/" | |
| - "fastlane/" | |
| - '.gitignore' | |
| - "*.md" | |
| - "LICENSE" | |
| pull_request: | |
| branches: [ "beta" ] | |
| paths-ignore: | |
| - ".github/**" | |
| - "!.github/workflows/**" | |
| - ".idea/" | |
| - "fastlane/" | |
| - '.gitignore' | |
| - "*.md" | |
| - "LICENSE" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build App | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate bot data | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| echo "RANDOM_QUOTE=$(shuf -n1 <<<"$LIST_OF_QUOTES")" >> $GITHUB_ENV | |
| env: | |
| LIST_OF_QUOTES: ${{ secrets.LIST_OF_QUOTES }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Set release type | |
| run: echo releaseType=CI > package.properties | |
| - name: Create signing files | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| mkdir -p ~/.gradle | |
| echo "${{ secrets.KEYSTORE_SECRET }}" | base64 -d > ~/key.jks | |
| echo "AKANE_RELEASE_STORE_FILE=$(realpath ~/key.jks)" > ~/.gradle/gradle.properties | |
| echo "AKANE_RELEASE_STORE_PASSWORD=${{ secrets.KEYSTORE_PWD }}" >> ~/.gradle/gradle.properties | |
| echo "AKANE_RELEASE_KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> ~/.gradle/gradle.properties | |
| echo "AKANE_RELEASE_KEY_PASSWORD=${{ secrets.KEY_PWD }}" >> ~/.gradle/gradle.properties | |
| - name: Build with Gradle | |
| if: github.event_name != 'pull_request' | |
| run: ./gradlew :app:assembleRelease | |
| - name: Build with Gradle for pull request | |
| if: github.event_name == 'pull_request' | |
| run: ./gradlew :app:assembleDebug | |
| - name: Find apk | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| APK_FILE=$(find app/build/outputs/apk/release -name '*.apk') | |
| echo "APK_FILE=$APK_FILE" >> $GITHUB_ENV | |
| echo "APK_FILE_NAME=$(basename $APK_FILE .apk)" >> $GITHUB_ENV | |
| - name: Find apk for pull request | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| APK_FILE=$(find app/build/outputs/apk/debug -name '*.apk') | |
| echo "APK_FILE=$APK_FILE" >> $GITHUB_ENV | |
| echo "APK_FILE_NAME=$(basename $APK_FILE .apk)" >> $GITHUB_ENV | |
| env: | |
| API_ID: ${{ secrets.TG_APP_ID }} | |
| API_HASH: ${{ secrets.TG_APP_HASH }} | |
| BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} | |
| - name: Upload files to Telegram | |
| if: github.event_name != 'pull_request' | |
| uses: xz-dev/TelegramFileUploader@v1.1.1 | |
| with: | |
| to-who: ${{ secrets.TG_CHAT_ID }} | |
| message: ${{ env.RANDOM_QUOTE }} | |
| files: | | |
| ${{ env.APK_FILE }} | |
| env: | |
| API_ID: ${{ secrets.TG_APP_ID }} | |
| API_HASH: ${{ secrets.TG_APP_HASH }} | |
| BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} | |
| - name: Upload apk | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.APK_FILE_NAME }} | |
| path: ${{ env.APK_FILE }} | |
| compression-level: 9 |