-
Notifications
You must be signed in to change notification settings - Fork 439
68 lines (63 loc) · 1.91 KB
/
auto-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Auto Build & Release
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
HAVE_TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID != '' }}
on:
workflow_dispatch:
inputs:
TELEGRAM_NO_ROOT_UPLOAD:
description: "Upload Non Rooted APKs to Telegram"
required: false
type: boolean
default: true
TELEGRAM_ROOT_UPLOAD:
description: "Upload Magisk Module from nikhilbadyal/revanced-magisk-module to Telegram"
required: false
type: boolean
default: true
schedule:
- cron: '0 * * * *'
jobs:
release-check:
permissions: write-all
runs-on: ubuntu-latest
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Env for custom build
run: |
echo "${{ secrets.ENVS }}" >> .env
- name: Setup python
uses: actions/setup-python@main
with:
python-version: '3.12.3'
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Should build?
id: should_build
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
should_build=$(python check_resource_updates.py)
echo "SHOULD_BUILD=$should_build" >> $GITHUB_OUTPUT
outputs:
SHOULD_BUILD: ${{ steps.should_build.outputs.SHOULD_BUILD }}
build-release:
permissions: write-all
needs: release-check
uses: ./.github/workflows/build-apk.yml
if: ${{ needs.release-check.outputs.SHOULD_BUILD }}
secrets: inherit
concurrency:
group: Auto-Release-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
with:
TELEGRAM_NO_ROOT_UPLOAD: true
PREFERRED_PATCH_APPS: ${{ needs.release-check.outputs.SHOULD_BUILD }}