Skip to content

Commit 051ad40

Browse files
Merge pull request #9 from alrescha79-cmd/dev
chore: Update docs and CI
2 parents e694831 + 91dea19 commit 051ad40

3 files changed

Lines changed: 79 additions & 3 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,74 @@ jobs:
209209
needs: [build-arm64, build-armv7, build-universal]
210210

211211
steps:
212+
- name: Checkout repository
213+
uses: actions/checkout@v4
214+
with:
215+
fetch-depth: 0
216+
217+
- name: Get previous tag
218+
id: prev_tag
219+
run: |
220+
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
221+
echo "prev_tag=$PREV_TAG" >> $GITHUB_OUTPUT
222+
echo "Previous tag: $PREV_TAG"
223+
224+
- name: Generate Release Notes from PRs
225+
id: release_notes
226+
env:
227+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
228+
run: |
229+
PREV_TAG="${{ steps.prev_tag.outputs.prev_tag }}"
230+
REPO="${{ github.repository }}"
231+
232+
# Get commits since last tag (or all if no previous tag)
233+
if [ -n "$PREV_TAG" ]; then
234+
COMMITS=$(git log ${PREV_TAG}..HEAD --pretty=format:"%H" 2>/dev/null || echo "")
235+
else
236+
COMMITS=$(git log --pretty=format:"%H" 2>/dev/null || echo "")
237+
fi
238+
239+
# Find merged PRs from commits
240+
echo "## What's Changed" > release_notes.md
241+
echo "" >> release_notes.md
242+
243+
PR_FOUND=false
244+
for COMMIT in $COMMITS; do
245+
# Get PR number from commit (if merged via PR)
246+
PR_DATA=$(gh api "repos/${REPO}/commits/${COMMIT}/pulls" --jq '.[0] | {number, title, user: .user.login, html_url}' 2>/dev/null || echo "")
247+
248+
if [ -n "$PR_DATA" ] && [ "$PR_DATA" != "null" ]; then
249+
PR_NUM=$(echo "$PR_DATA" | jq -r '.number')
250+
PR_TITLE=$(echo "$PR_DATA" | jq -r '.title')
251+
PR_USER=$(echo "$PR_DATA" | jq -r '.user')
252+
PR_URL=$(echo "$PR_DATA" | jq -r '.html_url')
253+
254+
# Check if already added (avoid duplicates)
255+
if ! grep -q "#${PR_NUM}" release_notes.md 2>/dev/null; then
256+
echo "* ${PR_TITLE} by @${PR_USER} in [#${PR_NUM}](${PR_URL})" >> release_notes.md
257+
PR_FOUND=true
258+
fi
259+
fi
260+
done
261+
262+
if [ "$PR_FOUND" = false ]; then
263+
echo "* Various improvements and bug fixes" >> release_notes.md
264+
fi
265+
266+
echo "" >> release_notes.md
267+
268+
# Add full changelog link
269+
if [ -n "$PREV_TAG" ]; then
270+
echo "**Full Changelog**: https://github.com/${REPO}/compare/${PREV_TAG}...v${{ needs.build-arm64.outputs.version }}" >> release_notes.md
271+
fi
272+
273+
# Output for use in release body
274+
{
275+
echo 'notes<<EOF'
276+
cat release_notes.md
277+
echo 'EOF'
278+
} >> $GITHUB_OUTPUT
279+
212280
- name: Download all APKs
213281
uses: actions/download-artifact@v4
214282
with:
@@ -226,6 +294,10 @@ jobs:
226294
body: |
227295
## Huawei Manager v${{ needs.build-arm64.outputs.version }}
228296
297+
${{ steps.release_notes.outputs.notes }}
298+
299+
---
300+
229301
### Downloads
230302
- **arm64-v8a** - For modern 64-bit devices (recommended)
231303
- **armeabi-v7a** - For older 32-bit devices
@@ -250,6 +322,10 @@ jobs:
250322
body: |
251323
## Huawei Manager ${{ github.event.inputs.version }}
252324
325+
${{ steps.release_notes.outputs.notes }}
326+
327+
---
328+
253329
### Downloads
254330
- **arm64-v8a** - For modern 64-bit devices (recommended)
255331
- **armeabi-v7a** - For older 32-bit devices

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
| Home | WiFi | SMS | Sett |
6666
|:---------:|:----:|:---:|:--------:|
67-
| ![home](https://github.com/user-attachments/assets/20b0b754-97c7-4463-87f0-554a8a4ac74c) | ![wifi](https://github.com/user-attachments/assets/a42b5ef0-2d1e-4f44-b1f6-a6c6f39ee722) | ![sms](https://github.com/user-attachments/assets/02051333-b094-4c52-9baf-a6d0f491cdf9) | ![settings](https://github.com/user-attachments/assets/185a3edf-af6a-47b3-88d2-1fe56fddb0a1) |
67+
| ![home](https://github.com/user-attachments/assets/26599904-d63a-42ed-a45b-e13c0ac23d43) | ![wifi](https://github.com/user-attachments/assets/a42b5ef0-2d1e-4f44-b1f6-a6c6f39ee722) | ![sms](https://github.com/user-attachments/assets/02051333-b094-4c52-9baf-a6d0f491cdf9) | ![settings](https://github.com/user-attachments/assets/185a3edf-af6a-47b3-88d2-1fe56fddb0a1) |
6868

6969
<p align="center">
7070
<em>Light Mode| 🇮🇩 ID</em>
@@ -74,7 +74,7 @@
7474

7575
| Home | WiFi | SMS | Sett |
7676
|:---------:|:----:|:---:|:--------:|
77-
| ![home](https://github.com/user-attachments/assets/6b6da857-3476-4e23-9075-22af158decf0) | ![wifi](https://github.com/user-attachments/assets/40b126bc-aa33-4813-af4a-8e17fa4687c3) | ![sms](https://github.com/user-attachments/assets/6b8c2297-8369-452e-9fa9-cd77a1fa4d3c) | ![settings](https://github.com/user-attachments/assets/60eb10a8-19ae-4cac-a06f-f07ce9eabbbb) |
77+
| ![home](https://github.com/user-attachments/assets/eff4fd91-d750-4aac-9c37-9e7af39f34ef) | ![wifi](https://github.com/user-attachments/assets/40b126bc-aa33-4813-af4a-8e17fa4687c3) | ![sms](https://github.com/user-attachments/assets/6b8c2297-8369-452e-9fa9-cd77a1fa4d3c) | ![settings](https://github.com/user-attachments/assets/60eb10a8-19ae-4cac-a06f-f07ce9eabbbb) |
7878

7979

8080
---

src/i18n/id.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"upload": "Unggah",
9898
"currentSession": "Sesi",
9999
"monthlyUsage": "Penggunaan Bulanan",
100-
"totalUsage": "Total Bulanan",
100+
"totalUsage": "Total Penggunaan",
101101
"downloadSpeed": "Kecepatan Unduh",
102102
"uploadSpeed": "Kecepatan Unggah",
103103
"wanInfo": "Info WAN",

0 commit comments

Comments
 (0)