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-Lightning-Browser | |
| on: | |
| push: | |
| paths: | |
| - .github/workflows/test18.yml | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # - uses: actions/checkout@v4 | |
| - name: Delete workflow runs | |
| uses: Mattraks/delete-workflow-runs@v2 | |
| with: | |
| token: ${{ github.token }} | |
| repository: ${{ github.repository }} | |
| retain_days: 0 | |
| keep_minimum_runs: 1 | |
| - name: Checkout Source Code | |
| run: | | |
| git clone --depth 1 https://github.com/AoThen/Lightning-Browser Lightning-Browser_temp | |
| mv -f Lightning-Browser_temp/* ./ | |
| rm -rf Lightning-Browser_temp | |
| # - name: Copy CI gradle.properties | |
| # shell: bash | |
| # run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 17 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Decode Keystore | |
| run: | | |
| echo "${{ secrets.SIGNING_KEY_BASE64 }}" | base64 -d > app/kt.jksx | |
| echo "storePassword=${{ secrets.KEY_STORE_PASSWORD }}" > keystore.properties | |
| echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> keystore.properties | |
| echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> keystore.properties | |
| echo "storeFile=kt.jksx" >> keystore.properties | |
| - name: build | |
| env: | |
| SIGN_STORE_FILE: kt.jksx | |
| SIGN_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }} | |
| SIGN_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| SIGN_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| run: ./gradlew assembleRelease | |
| - name: Prepare App | |
| run: | | |
| find . -name "*.apk" -exec du -h {} \; | |
| mkdir -p ${{ github.workspace }}/OutAPK/ | |
| find . -name "*.apk" -exec mv {} ${{ github.workspace }}/OutAPK/ \; | |
| # cd packages/app-mobile/android | |
| # ./gradlew assembleRelease | |
| # cd packages/app-mobile/android/app | |
| # APK_FILE="./build/outputs/apk/release/app-release.apk" | |
| # if test ! -f "$APK_FILE" ; then | |
| # echo "APK file not found." | |
| # exit 1 | |
| # else | |
| # echo "APK file found at: $APK_FILE" | |
| # fi | |
| # for file in `find ~ \( -name "*.apk" -o -name "*java*.apk" \) -not -name "*x86*" -print`; do | |
| # base=$(basename "$file") | |
| # new_base="bitwarden_$base" | |
| # mv "$file" "OutAPK/$new_base" | |
| # done | |
| # ls OutAPK/*.apk | |
| - name: Upload App To Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Lightning-Browser | |
| path: ${{ github.workspace }}/OutAPK/*.apk |