feat: add libtorrent build #34
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 Release APK | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| jobs: | |
| build-apk: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Update ABI Filters | |
| run: | | |
| chmod +x scripts/update_abi_filters.sh | |
| ./scripts/update_abi_filters.sh | |
| - name: Set up JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Decode Keystore | |
| run: | | |
| echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > app/keystore.jks | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build Release APK | |
| env: | |
| KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| BUILD_ACTOR: ${{ github.actor }} | |
| run: | | |
| echo "storePassword=$KEYSTORE_PASSWORD" >> app/keystore.properties | |
| echo "keyPassword=$KEY_PASSWORD" >> app/keystore.properties | |
| echo "keyAlias=$KEY_ALIAS" >> app/keystore.properties | |
| echo "storeFile=keystore.jks" >> app/keystore.properties | |
| ./gradlew assembleRelease | |
| - name: Upload Output | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: output | |
| path: app/build/outputs/ | |
| if-no-files-found: error | |
| retention-days: 7 | |
| compression-level: 6 | |
| overwrite: true | |
| - name: Install tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qrencode jq | |
| - name: Create APK QRCode | |
| if: github.actor == 'yearsyan' | |
| continue-on-error: true | |
| env: | |
| UPLOAD_BASE: ${{ secrets.UPLOAD_BASE }} | |
| UPLOAD_TOKEN: ${{ secrets.UPLOAD_TOKEN }} | |
| run: | | |
| HASH=${GITHUB_SHA:0:8} | |
| chmod +x scripts/upload_file.sh | |
| ./scripts/upload_file.sh temp/apk/yaad-${HASH}.apk app/build/outputs/apk/release/app-release.apk | |
| - name: Clean up | |
| run: | | |
| rm app/keystore.jks | |
| rm app/keystore.properties |