Skip to content

Commit 21e4af7

Browse files
committed
refactor: tauri app build and release process in workflow
1 parent af4b1f8 commit 21e4af7

File tree

1 file changed

+24
-85
lines changed

1 file changed

+24
-85
lines changed

.github/workflows/main-release.yml

Lines changed: 24 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -647,108 +647,47 @@ jobs:
647647

648648
- name: Build and release Tauri app
649649
id: tauri-action
650-
continue-on-error: true
651-
run: |
652-
echo "🔨 Building and releasing Tauri app for ${{ matrix.build_name }}..."
653-
654-
# Set up environment variables
655-
export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"
656-
export TAURI_SIGNING_PRIVATE_KEY="${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}"
657-
export TAURI_SIGNING_PRIVATE_KEY_PASSWORD="${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}"
658-
export APPLE_CERTIFICATE="${{ secrets.APPLE_CERTIFICATE }}"
659-
export APPLE_CERTIFICATE_PASSWORD="${{ secrets.APPLE_CERTIFICATE_PASSWORD }}"
660-
export APPLE_SIGNING_IDENTITY="${{ secrets.APPLE_SIGNING_IDENTITY }}"
661-
export APPLE_ID="${{ secrets.APPLE_ID }}"
662-
export APPLE_PASSWORD="${{ secrets.APPLE_PASSWORD }}"
663-
export APPLE_TEAM_ID="${{ secrets.APPLE_TEAM_ID }}"
664-
export TAURI_BUNDLE_MACOS_SIGNING_IDENTITY="${{ secrets.APPLE_SIGNING_IDENTITY }}"
665-
export CI=true
666-
667-
# Build with retry logic
668-
set +e
669-
pnpm tauri build ${{ matrix.args }} --verbose
670-
BUILD_EXIT_CODE=$?
671-
set -e
672-
673-
if [[ $BUILD_EXIT_CODE -ne 0 ]]; then
674-
echo "❌ First build attempt failed (exit code: $BUILD_EXIT_CODE)"
675-
echo "🔄 Attempting clean build..."
676-
677-
# Clean and retry
678-
rm -rf dist src-tauri/target/release
679-
pnpm tauri build ${{ matrix.args }} --verbose
680-
BUILD_EXIT_CODE=$?
681-
682-
if [[ $BUILD_EXIT_CODE -ne 0 ]]; then
683-
echo "❌ Build failed after retry (exit code: $BUILD_EXIT_CODE)"
684-
echo "build_success=false" >> $GITHUB_OUTPUT
685-
exit 1
686-
fi
687-
fi
688-
689-
echo "✅ Tauri build completed successfully"
690-
echo "build_success=true" >> $GITHUB_OUTPUT
691-
692-
- name: Create GitHub Release
693-
if: steps.tauri-action.outputs.build_success == 'true'
694-
uses: softprops/action-gh-release@v1
650+
uses: tauri-apps/tauri-action@v0
651+
env:
652+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
653+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
654+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
655+
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
656+
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
657+
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
658+
APPLE_ID: ${{ secrets.APPLE_ID }}
659+
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
660+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
695661
with:
696-
tag_name: ${{ needs.prepare-release.outputs.tag }}
697-
name: "mpesa2csv ${{ needs.prepare-release.outputs.tag }}"
698-
body: |
662+
tagName: ${{ needs.prepare-release.outputs.tag }}
663+
releaseName: "mpesa2csv ${{ needs.prepare-release.outputs.tag }}"
664+
releaseBody: |
699665
## What's New in v${{ needs.prepare-release.outputs.version }}
700666
701-
${{ steps.changelog.outputs.total_changes > 0 && format('📊 **Release Summary**: {0} changes', steps.changelog.outputs.total_changes) || '' }}
702-
703-
${{ steps.changelog.outputs.breaking > 0 && '> ⚠️ **BREAKING CHANGES**: This release contains breaking changes. Please review the changelog carefully before updating.' || '' }}
704-
705-
${{ steps.changelog.outputs.security > 0 && '> 🔒 **SECURITY UPDATE**: This release includes important security fixes. We recommend updating as soon as possible.' || '' }}
706-
707667
${{ steps.changelog.outputs.changelog }}
708668
709-
${{ steps.changelog.outputs.features > 0 && steps.changelog.outputs.fixes > 0 && format('🎯 **Highlights**: This release brings {0} new features and fixes {1} bugs for a better user experience.', steps.changelog.outputs.features, steps.changelog.outputs.fixes) || '' }}
710-
${{ steps.changelog.outputs.features > 0 && steps.changelog.outputs.fixes == 0 && format('✨ **Feature Release**: Introducing {0} new features to enhance your workflow.', steps.changelog.outputs.features) || '' }}
711-
${{ steps.changelog.outputs.features == 0 && steps.changelog.outputs.fixes > 0 && format('🔧 **Maintenance Release**: This update focuses on stability with {0} bug fixes.', steps.changelog.outputs.fixes) || '' }}
712-
713669
---
714670
715-
## 📥 Download & Installation
716-
717-
Choose the appropriate download for your platform:
718-
719-
| Platform | Architecture | Download | Installation |
720-
|----------|-------------|----------|--------------|
721-
| **Windows** | x64 (Intel/AMD) | [📥 Download .exe](https://github.com/DavidAmunga/mpesa2csv/releases/download/${{ needs.prepare-release.outputs.tag }}/mpesa2csv_${{ needs.prepare-release.outputs.version }}_x64-setup.exe) | Run the installer and follow the setup wizard |
722-
| **macOS** | Apple Silicon (M1/M2/M3) | [📥 Download .dmg](https://github.com/DavidAmunga/mpesa2csv/releases/download/${{ needs.prepare-release.outputs.tag }}/mpesa2csv_${{ needs.prepare-release.outputs.version }}_aarch64.dmg) | Open DMG and drag to Applications |
723-
| **macOS** | Intel x64 | [📥 Download .dmg](https://github.com/DavidAmunga/mpesa2csv/releases/download/${{ needs.prepare-release.outputs.tag }}/mpesa2csv_${{ needs.prepare-release.outputs.version }}_x64.dmg) | Open DMG and drag to Applications |
724-
| **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` |
725-
| **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` |
671+
## 📥 Installation
726672
727-
### 📊 Release Metadata
673+
Download the appropriate file for your platform from the assets below:
728674
729-
- **Version**: `${{ needs.prepare-release.outputs.version }}`
730-
- **Build Date**: `${{ steps.timestamp.outputs.build_time }}`
731-
- **Total Changes**: ${{ steps.changelog.outputs.total_changes }}
732-
- **Platforms**: Windows, macOS (Intel + Apple Silicon), Linux
733-
${{ steps.changelog.outputs.breaking > 0 && format('- **Breaking Changes**: {0}', steps.changelog.outputs.breaking) || '' }}
734-
735-
### 🔍 System Requirements
675+
- **Windows**: `mpesa2csv_*_x64-setup.exe`
676+
- **macOS Apple Silicon**: `mpesa2csv_*_aarch64.dmg`
677+
- **macOS Intel**: `mpesa2csv_*_x64.dmg`
678+
- **Linux**: `mpesa2csv_*_amd64.deb` or `mpesa2csv_*_amd64.AppImage`
736679
680+
### System Requirements
737681
- **Windows**: Windows 10 version 1903 or later
738682
- **macOS**: macOS 10.15 Catalina or later
739683
- **Linux**: Modern distribution with GTK 3.24+ and WebKit2GTK 4.1+
740684
741-
### 🔄 Auto-Update
742-
743-
> **Note**: If you have a previous version installed, the app will automatically notify you when this update is available and guide you through the update process.
744-
745685
---
746686
747-
**Full Changelog**: https://github.com/${{ github.repository }}/compare/v${{ steps.changelog.outputs.previous_version || '0.0.2' }}...v${{ needs.prepare-release.outputs.version }}
748-
draft: false
687+
**Full Changelog**: https://github.com/${{ github.repository }}/compare/v${{ steps.changelog.outputs.previous_version || '0.6.1' }}...v${{ needs.prepare-release.outputs.version }}
688+
releaseDraft: false
749689
prerelease: false
750-
env:
751-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
690+
args: ${{ matrix.args }}
752691

753692
# Step 6: Generate and upload updater JSON
754693
generate-updater-json:

0 commit comments

Comments
 (0)