2022-02-07 23:03:06 +05:30
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
2022-05-18 18:35:51 +05:30
|
|
|
- "README*.md"
|
|
|
|
- "fastlane/**"
|
|
|
|
- "assets/**"
|
|
|
|
- ".github/**/*.md"
|
2022-02-07 23:03:06 +05:30
|
|
|
push:
|
|
|
|
paths-ignore:
|
2022-05-18 18:35:51 +05:30
|
|
|
- "README*.md"
|
|
|
|
- "fastlane/**"
|
|
|
|
- "assets/**"
|
|
|
|
- ".github/**/*.md"
|
2022-02-07 23:03:06 +05:30
|
|
|
|
|
|
|
jobs:
|
2022-02-07 23:14:23 +05:30
|
|
|
debug-builds:
|
2022-02-07 23:03:06 +05:30
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-04 20:31:58 +05:30
|
|
|
- uses: actions/checkout@v4
|
2024-04-13 08:21:50 +05:30
|
|
|
- uses: gradle/wrapper-validation-action@v3
|
2023-12-06 18:46:15 +05:30
|
|
|
- uses: actions/setup-python@v5
|
2022-09-18 14:28:54 +05:30
|
|
|
with:
|
|
|
|
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
|
|
|
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
2022-02-07 23:03:06 +05:30
|
|
|
|
2023-11-19 22:37:39 +05:30
|
|
|
- name: Retrieve Commit Info
|
2022-09-17 23:28:46 +05:30
|
|
|
run: |
|
|
|
|
cd .github
|
|
|
|
curl https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }} > commit.json
|
|
|
|
cd ..
|
|
|
|
|
2023-04-18 06:07:36 +05:30
|
|
|
- name: Set up JDK 17
|
2023-11-29 21:05:07 +05:30
|
|
|
uses: actions/setup-java@v4
|
2022-02-07 23:03:06 +05:30
|
|
|
with:
|
2023-04-18 06:07:36 +05:30
|
|
|
java-version: 17
|
2022-02-07 23:03:06 +05:30
|
|
|
distribution: "temurin"
|
2022-05-18 18:35:51 +05:30
|
|
|
cache: "gradle"
|
2022-02-07 23:03:06 +05:30
|
|
|
|
2022-09-22 11:26:44 +05:30
|
|
|
- name: Git Configuraion
|
2022-09-17 23:28:46 +05:30
|
|
|
run: |
|
2024-04-16 23:18:50 +05:30
|
|
|
git config --global user.name "libretube-bot"
|
|
|
|
git config --global user.email "libretube@proton.me"
|
2022-09-17 23:28:46 +05:30
|
|
|
git config --global credential.helper store
|
2024-04-16 23:18:50 +05:30
|
|
|
echo "https://libretube-bot:${{ secrets.GH_TOKEN }}@github.com" > ~/.git-credentials
|
2022-09-17 23:28:46 +05:30
|
|
|
|
2023-01-02 22:59:34 +05:30
|
|
|
- name: Compile
|
2022-06-15 20:59:23 +05:30
|
|
|
run: |
|
2022-06-15 21:09:00 +05:30
|
|
|
./gradlew assembleDebug
|
2022-02-07 23:03:06 +05:30
|
|
|
|
2022-10-22 16:06:11 +05:30
|
|
|
- name: Sign Apk
|
2022-10-23 10:39:47 +05:30
|
|
|
continue-on-error: true
|
2022-10-22 16:06:11 +05:30
|
|
|
id: sign_apk
|
|
|
|
uses: ilharp/sign-android-release@v1
|
|
|
|
with:
|
|
|
|
releaseDir: app/build/outputs/apk/debug
|
|
|
|
signingKey: ${{ secrets.ANDROID_SIGNING_KEY }}
|
|
|
|
keyAlias: ${{ secrets.ANDROID_KEY_ALIAS }}
|
|
|
|
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
|
|
|
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
|
|
|
|
2022-09-17 23:28:46 +05:30
|
|
|
- name: Upload to Archive
|
2022-09-18 14:28:54 +05:30
|
|
|
continue-on-error: true
|
2022-09-17 23:28:46 +05:30
|
|
|
run: |
|
2022-09-21 19:34:55 +05:30
|
|
|
mv .github/uploader.py .
|
2023-11-19 22:37:39 +05:30
|
|
|
echo "GH_REPO = '${{ github.repository }}'" > config_file.py
|
2023-04-26 22:27:00 +05:30
|
|
|
git clone --filter=blob:none https://github.com/libre-tube/NightlyBuilds nightly
|
2023-04-26 15:42:20 +05:30
|
|
|
rm -rf nightly/*.apk
|
|
|
|
mv app/build/outputs/apk/debug/*.apk nightly/
|
|
|
|
cd nightly
|
2022-10-16 07:03:22 +05:30
|
|
|
python ../uploader.py
|
2022-09-18 14:28:54 +05:30
|
|
|
|
2022-02-07 23:03:06 +05:30
|
|
|
- name: Upload APK
|
2023-12-14 23:19:09 +05:30
|
|
|
uses: actions/upload-artifact@v4
|
2022-02-07 23:03:06 +05:30
|
|
|
with:
|
|
|
|
name: app
|
2023-04-26 15:48:17 +05:30
|
|
|
path: nightly/*.apk
|
2022-10-22 16:06:11 +05:30
|
|
|
|