Skip to content

Commit 8aca29e

Browse files
committed
automate release workflow
1 parent 1cddaa4 commit 8aca29e

File tree

7 files changed

+62
-7
lines changed

7 files changed

+62
-7
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## v1.2.3
2+
3+
- fully automate release workflow
4+
- update magisk module build number
5+
6+
## v1.2.2
7+
8+
- align file names with LineageOS (arm and arm64)
9+
10+
## v1.2.1
11+
12+
- fix recovery zip failing to work on A/B devices
13+
14+
## v1.2.0
15+
16+
- fix compatibility with LineageOS 22.2

magisk/module.prop

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
id=lineage_dialer_rro
22
name=Lineage Dialer RRO
3-
version=v1.2.0
4-
versionCode=1
3+
version=
4+
versionCode=
55
author=2shrestha22
6-
description=Enables call recording in Lineage OS Dialer for all countries.
7-
updateJson=
6+
description=Enables call recording in LineageOS dialer across all countries.
7+
updateJson=https://github.com/2shrestha22/lineage-call-recording-enabler/releases/download/latest/update.json

recovery/put_toybox_binary_here

Whitespace-only changes.
-7.12 KB
Binary file not shown.

release_body.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- align file names with LineageOS (arm and arm64)

0 commit comments

Comments
 (0)