@@ -10,16 +10,54 @@ jobs:
1010 steps :
1111 - uses : actions/checkout@v3
1212
13+ - name : Copy prebuilt overlay.
14+ run : |
15+ mkdir -p ./magisk/system/product/overlay/
16+ mkdir -p ./recovery/system/product/overlay/
17+ cp ./prebuilt/overlay/*.apk ./magisk/system/product/overlay/
18+ cp ./prebuilt/overlay/*.apk ./recovery/system/product/overlay/
19+
20+ - name : Update Magisk module version info
21+ run : |
22+ VERSION_TAG=${GITHUB_REF#refs/tags/}
23+ sed -i "s/^version=.*/version=${VERSION_TAG}/" ./magisk/module.prop
24+ sed -i "s/^versionCode=.*/versionCode=${GITHUB_RUN_NUMBER}/" ./magisk/module.prop
25+
1326 - name : Zip files for Magisk.
1427 run : 7za a -tzip -r lineage_dialer_rro-magisk.zip ./magisk/*
1528
1629 - name : Zip files for recovery (arm).
17- run : mv ./toybox/arm/toybox ./recovery/toybox && 7za a -tzip -r lineage_dialer_rro-recovery-arm.zip ./recovery/*
30+ run : |
31+ mv ./toybox/arm/toybox ./recovery/toybox
32+ 7za a -tzip -r lineage_dialer_rro-recovery-arm.zip ./recovery/*
1833
1934 - name : Zip files for recovery (arm64).
20- run : mv ./toybox/arm64/toybox ./recovery/toybox && 7za a -tzip -r lineage_dialer_rro-recovery-arm64.zip ./recovery/*
35+ run : |
36+ mv ./toybox/arm64/toybox ./recovery/toybox
37+ 7za a -tzip -r lineage_dialer_rro-recovery-arm64.zip ./recovery/*
38+
39+ - name : Create update.json
40+ run : |
41+ VERSION_TAG=${GITHUB_REF#refs/tags/}
42+ cat <<EOF > update.json
43+ {
44+ "version": "${VERSION_TAG}",
45+ "versionCode": ${GITHUB_RUN_NUMBER},
46+ "zipUrl": "https://github.com/2shrestha22/lineage-call-recording-enabler/releases/download/${VERSION_TAG}/lineage_dialer_rro-magisk.zip",
47+ "changelog": "https://raw.githubusercontent.com/2shrestha22/lineage-call-recording-enabler/refs/heads/main/CHANGELOG.md"
48+ }
49+ EOF
50+
51+ - name : Prepare release body
52+ run : |
53+ VERSION_TAG=${GITHUB_REF#refs/tags/}
54+ # Extract the section for the current tag
55+ awk "/^## $VERSION_TAG$/ {flag=1; next} /^## / {flag=0} flag" CHANGELOG.md | sed '/^$/d' > release_body.txt
2156
2257 - name : Create release
2358 uses : softprops/action-gh-release@v1
2459 with :
25- files : lineage-dialer-rro_*.zip
60+ files : |
61+ lineage_dialer_rro-*.zip
62+ update.json
63+ body_path : release_body.txt
0 commit comments