Skip to content

Commit e44cbbf

Browse files
authored
Merge pull request #40 from DavidAmunga/fix/app-improvements
2 parents 45078aa + f8ffc32 commit e44cbbf

File tree

17 files changed

+520
-176
lines changed

17 files changed

+520
-176
lines changed

.changeset/thirty-rules-shop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"mpesa2csv": patch
3+
---
4+
5+
fix: minor app improvements

.github/workflows/main-release.yml

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ jobs:
463463

464464
- name: Build and release Tauri app
465465
uses: tauri-apps/tauri-action@v0
466+
id: tauri-action
466467
env:
467468
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
468469
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
@@ -508,7 +509,6 @@ jobs:
508509
| **Linux** | x64 (Ubuntu/Debian) | [📥 Download .deb](https://github.com/DavidAmunga/mpesa2csv/releases/download/${{ needs.prepare-release.outputs.tag }}/mpesa2csv_${{ needs.prepare-release.outputs.version }}_amd64.deb) | `sudo dpkg -i mpesa2csv_*.deb` |
509510
| **Linux** | x64 (Portable) | [📥 Download .AppImage](https://github.com/DavidAmunga/mpesa2csv/releases/download/${{ needs.prepare-release.outputs.tag }}/mpesa2csv_${{ needs.prepare-release.outputs.version }}_amd64.AppImage) | `chmod +x mpesa2csv_*.AppImage && ./mpesa2csv_*.AppImage` |
510511
${{ needs.build-android.result == 'success' && format('| **Android** | ARM64 | [📥 Download .apk](https://github.com/DavidAmunga/mpesa2csv/releases/download/{0}/mpesa2csv-v{1}-universal-release.apk) | Enable "Install from unknown sources" and install', needs.prepare-release.outputs.tag, needs.prepare-release.outputs.version) || '' }}
511-
${{ needs.build-android.result == 'success' && format('| **Android** | ARM64 | [📥 Download .aab](https://github.com/DavidAmunga/mpesa2csv/releases/download/{0}/mpesa2csv-v{1}-universal-release.aab) | For Google Play Store or enterprise distribution', needs.prepare-release.outputs.tag, needs.prepare-release.outputs.version) || '' }}
512512
513513
### 📊 Release Metadata
514514
@@ -567,23 +567,90 @@ jobs:
567567
env:
568568
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
569569

570-
# Step 6: Create release branch for hotfixes
570+
# Step 6: Generate and upload updater JSON
571+
generate-updater-json:
572+
name: "Generate Updater JSON"
573+
needs: [check-release, prepare-release, build-and-release]
574+
if: needs.check-release.outputs.should_release == 'true'
575+
runs-on: ubuntu-latest
576+
permissions:
577+
contents: write
578+
steps:
579+
- uses: actions/checkout@v4
580+
581+
- name: Generate and upload latest.json
582+
run: |
583+
echo "🔄 Generating latest.json for Tauri updater..."
584+
585+
VERSION="${{ needs.prepare-release.outputs.version }}"
586+
TAG="${{ needs.prepare-release.outputs.tag }}"
587+
588+
# Create the latest.json file
589+
cat > latest.json << EOF
590+
{
591+
"version": "$VERSION",
592+
"notes": "Update to version $VERSION. See full release notes at https://github.com/${{ github.repository }}/releases/tag/$TAG",
593+
"pub_date": "$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")",
594+
"platforms": {
595+
"darwin-aarch64": {
596+
"signature": "",
597+
"url": "https://github.com/${{ github.repository }}/releases/download/$TAG/mpesa2csv_${VERSION}_aarch64.app.tar.gz"
598+
},
599+
"darwin-x86_64": {
600+
"signature": "",
601+
"url": "https://github.com/${{ github.repository }}/releases/download/$TAG/mpesa2csv_${VERSION}_x64.app.tar.gz"
602+
},
603+
"linux-x86_64": {
604+
"signature": "",
605+
"url": "https://github.com/${{ github.repository }}/releases/download/$TAG/mpesa2csv_${VERSION}_amd64.AppImage.tar.gz"
606+
},
607+
"windows-x86_64": {
608+
"signature": "",
609+
"url": "https://github.com/${{ github.repository }}/releases/download/$TAG/mpesa2csv_${VERSION}_x64-setup.nsis.zip"
610+
}
611+
}
612+
}
613+
EOF
614+
615+
echo "📄 Generated latest.json:"
616+
cat latest.json
617+
618+
# Upload to the release
619+
echo "📤 Uploading latest.json to release $TAG..."
620+
gh release upload "$TAG" latest.json --clobber
621+
echo "✅ latest.json uploaded successfully"
622+
623+
# Verify the file is accessible
624+
echo "🔍 Verifying latest.json is accessible..."
625+
sleep 5 # Give GitHub a moment to process
626+
curl -f "https://github.com/${{ github.repository }}/releases/download/$TAG/latest.json" || echo "⚠️ latest.json not yet accessible"
627+
env:
628+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
629+
630+
# Step 7: Create release branch for hotfixes
571631
create-release-branch:
572632
name: "Create Release Branch"
573-
needs: [check-release, prepare-release, build-and-release]
633+
needs:
634+
[check-release, prepare-release, build-and-release, generate-updater-json]
574635
if: needs.check-release.outputs.should_release == 'true'
575636
uses: ./.github/workflows/reusable-create-release-branch.yml
576637
with:
577638
version: ${{ needs.prepare-release.outputs.tag }}
578639
max_branches: 5
579640
secrets: inherit
580641

581-
# Step 7: Notify about release completion
642+
# Step 8: Notify about release completion
582643
notify-completion:
583644
name: "Release Complete"
584645
runs-on: ubuntu-latest
585646
needs:
586-
[prepare-release, build-android, build-and-release, create-release-branch]
647+
[
648+
prepare-release,
649+
build-android,
650+
build-and-release,
651+
generate-updater-json,
652+
create-release-branch,
653+
]
587654
if: always() && needs.prepare-release.result == 'success'
588655
steps:
589656
- name: Release summary

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover" />
66
<title>Mpesa2CSV - Convert M-PESA PDFs to CSV</title>
77
<script>
88
window.pdfjsWorkerSrc = "/pdf.worker.min.mjs";

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616
"dependencies": {
1717
"@radix-ui/react-checkbox": "^1.3.3",
1818
"@radix-ui/react-label": "^2.1.7",
19+
"@radix-ui/react-scroll-area": "^1.2.10",
1920
"@radix-ui/react-select": "^2.2.6",
2021
"@radix-ui/react-slot": "^1.2.3",
2122
"@radix-ui/react-tooltip": "^1.2.8",
2223
"@tailwindcss/vite": "^4.1.3",
2324
"@tauri-apps/api": "^2",
2425
"@tauri-apps/plugin-dialog": "^2.2.1",
2526
"@tauri-apps/plugin-fs": "^2.4.2",
26-
"@tauri-apps/plugin-opener": "^2",
27+
"@tauri-apps/plugin-opener": "~2",
28+
"@tauri-apps/plugin-os": "^2.3.1",
2729
"@tauri-apps/plugin-process": "^2",
2830
"@tauri-apps/plugin-updater": "^2",
2931
"@types/papaparse": "^5.3.15",
@@ -37,6 +39,8 @@
3739
"react": "^19.1.0",
3840
"react-dom": "^19.1.0",
3941
"tailwind-merge": "^3.3.1",
42+
"tauri-plugin-pldownloader-api": "^1.0.1",
43+
"tauri-plugin-safe-area-insets": "^0.1.0",
4044
"zustand": "^5.0.8"
4145
},
4246
"devDependencies": {

pnpm-lock.yaml

Lines changed: 64 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)