disable legacy kotlin lsp #56
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: Build Test APK CI | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build app | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| cache: gradle | |
| - name: Cache Gradle Build Files | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/libs.versions.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Set Commit Hash | |
| id: commit_hash | |
| run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - name: Build Debug APK | |
| run: ./gradlew assembleDebug -Penable-updater && cp app/build/outputs/apk/debug/*.apk app/CodeAssist-Pro-${{ env.COMMIT_HASH }}.apk | |
| continue-on-error: false | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: CodeAssist-Pro-${{ env.COMMIT_HASH }} | |
| path: app/CodeAssist-Pro-${{ env.COMMIT_HASH }}.apk | |
| if-no-files-found: ignore | |
| - name: Get commit full message | |
| if: always() | |
| run: | | |
| echo "COMMIT_MSG<<EOF" >> $GITHUB_ENV | |
| git log -1 --pretty=%B >> $GITHUB_ENV | |
| echo "EOF" >> $GITHUB_ENV | |
| - name: Send commit and action info to Telegram | |
| if: always() | |
| env: | |
| STATUS: ${{ job.status }} | |
| # COMMIT_MSG: ${{ github.event.head_commit.message }} | |
| RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| REF_NAME: ${{ github.ref_name }} | |
| TAG_NAME: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || '' }} | |
| NIGHTLY_LINK: https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/CodeAssist-Pro-${{ env.COMMIT_HASH }}.zip | |
| run: | | |
| if [ "$STATUS" = "success" ]; then | |
| EMOJI="✅" | |
| TEXT="Build Successful" | |
| EXTRA_INFO=" | |
| Action: | |
| $RUN_URL | |
| Download: | |
| $NIGHTLY_LINK" | |
| elif [ "$STATUS" = "failure" ]; then | |
| EMOJI="❌" | |
| TEXT="Build Failed" | |
| EXTRA_INFO="" | |
| elif [ "$STATUS" = "cancelled" ]; then | |
| EMOJI="⛔" | |
| TEXT="Build Canceled" | |
| EXTRA_INFO="" | |
| else | |
| EMOJI="⚠️" | |
| TEXT="Unknown Status" | |
| EXTRA_INFO="" | |
| fi | |
| if [ -n "$TAG_NAME" ]; then | |
| EXTRA="Tag: $TAG_NAME" | |
| else | |
| EXTRA="Branch: $REF_NAME" | |
| fi | |
| MESSAGE=$(cat <<EOF | |
| new Commit pushed ⚡ | |
| Commit: | |
| $COMMIT_MSG | |
| Commit Hash: | |
| $COMMIT_HASH | |
| $EXTRA | |
| Status: | |
| $EMOJI $TEXT | |
| $EXTRA_INFO | |
| EOF | |
| ) | |
| curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" \ | |
| -F chat_id="-1003885942868" \ | |
| -F message_thread_id="2302" \ | |
| --form-string "text=$MESSAGE" |