forked from xHookman/IGExperimentsPatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (64 loc) · 3.14 KB
/
x.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
69
70
71
72
73
74
name: Patch and Upload APK Variants
on:
workflow_dispatch:
inputs:
arm64_v8a_URL:
description: 'Enter arm64-v8a APK URL'
required: true
armeabi_v7a_URL:
description: 'Enter armeabi-v7a APK URL'
required: true
version:
description: 'Enter the version number:'
required: true
channel:
description: 'Enter Channel: alpha beta stable'
required: true
jobs:
patch-and-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Download IGExperimentsPatcher and uber-apk-signer
run: |
wget --show-progress -q --progress=bar:force:noscroll https://github.com/xHookman/IGExperimentsPatcher/releases/download/1.0/IGExperimentsPatcher.jar -O IGExperimentsPatcher.jar
wget --show-progress -q --progress=bar:force:noscroll https://github.com/patrickfav/uber-apk-signer/releases/download/v1.3.0/uber-apk-signer-1.3.0.jar -O uber-apk-signer.jar
- name: Patch and Sign arm64-v8a APK
run: |
wget --show-progress -q --progress=bar:force:noscroll "${{ github.event.inputs.arm64_v8a_URL }}" -O arm64-v8a_${{ github.event.inputs.version }}.apk
java -jar IGExperimentsPatcher.jar arm64-v8a_${{ github.event.inputs.version }}.apk
java -jar uber-apk-signer.jar -a arm64-v8a_${{ github.event.inputs.version }}-patched.apk
- name: Upload arm64-v8a Artifact
uses: actions/upload-artifact@v3
with:
name: arm64-v8a_${{ github.event.inputs.version }}
path: arm64-v8a_${{ github.event.inputs.version }}-patched-aligned-debugSigned.apk
- name: Patch and Sign armeabi-v7a APK
run: |
wget --show-progress -q --progress=bar:force:noscroll "${{ github.event.inputs.armeabi_v7a_URL }}" -O armeabi-v7a_${{ github.event.inputs.version }}.apk
java -jar IGExperimentsPatcher.jar armeabi-v7a_${{ github.event.inputs.version }}.apk
java -jar uber-apk-signer.jar -a armeabi-v7a_${{ github.event.inputs.version }}-patched.apk
- name: Upload armeabi-v7a Artifact
uses: actions/upload-artifact@v3
with:
name: armeabi-v7a_${{ github.event.inputs.version }}
path: armeabi-v7a_${{ github.event.inputs.version }}-patched-aligned-debugSigned.apk
- name: Send message to Telegram
env:
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }}
run: |
MESSAGE="🆕 \`${{ github.event.inputs.channel }} ${{ github.event.inputs.version }}\` arm64v8a \\| armeabiv7a"
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
KEYBOARD='{"inline_keyboard":[[{"text":"Download","url":"'"$RUN_URL"'"}]]}'
curl -s -X POST "https://api.telegram.org/bot$TG_BOT_TOKEN/sendMessage" \
-d chat_id="$TG_CHAT_ID" \
-d text="$MESSAGE" \
-d parse_mode="MarkdownV2" \
-d reply_markup="$KEYBOARD"