mirror of https://github.com/deniscerri/ytdlnis
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
3.5 KiB
YAML
109 lines
3.5 KiB
YAML
name: Android CI
|
|
|
|
env:
|
|
main_project_module: app
|
|
|
|
permissions: {}
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- flavor: github
|
|
task: assembleGithubRelease
|
|
display_name: github
|
|
- flavor: foss
|
|
task: assembleFossRelease
|
|
display_name: FOSS
|
|
- flavor: izzy
|
|
task: assembleIzzyRelease
|
|
display_name: Izzy
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: 17
|
|
distribution: 'corretto'
|
|
cache: 'gradle'
|
|
|
|
- name: Configure Keystore & Properties
|
|
run: |
|
|
echo "${{ secrets.BASE_64_SIGNING_KEY }}" | base64 -d > app/release_keystore.jks
|
|
touch local.properties
|
|
echo "${{ secrets.LOCAL_PROPERTIES }}" > keystore.properties
|
|
chmod +x gradlew
|
|
|
|
# Build ONLY the specific flavor assigned to this matrix runner
|
|
- name: Build ${{ matrix.flavor }} APK release
|
|
run: ./gradlew ${{ matrix.task }} --warning-mode all
|
|
|
|
# Upload individual ABI artifacts for this runner's flavor
|
|
- name: Upload arm64
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ytdlnis-autogenerated-arm64-v8a-${{ matrix.flavor }}-release
|
|
path: ${{ env.main_project_module }}/build/outputs/apk/${{ matrix.flavor }}/release/*arm64*.apk
|
|
|
|
- name: Upload armeabiv7
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ytdlnis-autogenerated-armeabi-v7a-${{ matrix.flavor }}-release
|
|
path: ${{ env.main_project_module }}/build/outputs/apk/${{ matrix.flavor }}/release/*armeabi*.apk
|
|
|
|
- name: Upload universal
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ytdlnis-autogenerated-universal-${{ matrix.flavor }}-release
|
|
path: ${{ env.main_project_module }}/build/outputs/apk/${{ matrix.flavor }}/release/*universal*.apk
|
|
|
|
- name: Upload x86
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ytdlnis-autogenerated-x86-${{ matrix.flavor }}-release
|
|
path: ${{ env.main_project_module }}/build/outputs/apk/${{ matrix.flavor }}/release/*x86-*.apk
|
|
|
|
- name: Upload x86_64
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ytdlnis-autogenerated-x86_64-${{ matrix.flavor }}-release
|
|
path: ${{ env.main_project_module }}/build/outputs/apk/${{ matrix.flavor }}/release/*x86_64*.apk
|
|
|
|
- name: Upload Full Folder
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: YTDLnis APK release ${{ matrix.display_name }} generated
|
|
path: ${{ env.main_project_module }}/build/outputs/apk/${{ matrix.flavor }}/release/
|
|
|
|
# Separate job for Telegram so you only get ONE notification when all builds finish
|
|
notify:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
- name: Send Telegram Message
|
|
continue-on-error: true
|
|
uses: appleboy/telegram-action@master
|
|
with:
|
|
to: ${{ secrets.TELEGRAM_TO }}
|
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
|
message: |
|
|
${{ github.actor }} created commit:
|
|
Commit message: ${{ github.event.commits[0].message }}
|
|
Repository: ${{ github.repository }}
|
|
See changes: https://github.com/${{ github.repository }}/commit/${{ github.sha }} |