Disable cache
All checks were successful
Flutter Release / get-version (push) Successful in 10s
Flutter Release / build-windows (push) Successful in 1m58s
Flutter Release / build-android (push) Successful in 11m36s
Flutter Release / create-release (push) Successful in 30s

This commit is contained in:
2025-12-15 13:21:50 -05:00
parent dae47fdeb9
commit e82255d8a1
6 changed files with 193 additions and 27 deletions

View File

@@ -110,15 +110,49 @@ jobs:
}
}
# Create portable (single exe) archive
if (Test-Path "build\windows\standalone\rmtpocketwatcher.exe") {
Compress-Archive -Path "build\windows\standalone\rmtpocketwatcher.exe" -DestinationPath "rmtPocketWatcher-Windows-Portable-v$version.zip" -CompressionLevel Optimal -Force
Write-Host "Created rmtPocketWatcher-Windows-Portable-v$version.zip"
# Build self-extracting portable exe (single file distribution)
Write-Host "Building self-extracting portable executable..."
.\build_sfx.ps1
# Copy SFX exe to root for upload
if (Test-Path "build\windows\sfx\rmtPocketWatcher-v$version-Portable.exe") {
Copy-Item "build\windows\sfx\rmtPocketWatcher-v$version-Portable.exe" "rmtPocketWatcher-Windows-Portable-v$version.exe" -Force
Write-Host "Created rmtPocketWatcher-Windows-Portable-v$version.exe"
}
# Copy MSIX to root for easier upload
$msixFile = Get-ChildItem -Path "build\windows\x64\runner\Release" -Filter "*.msix" -ErrorAction SilentlyContinue | Select-Object -First 1
if ($msixFile) {
Copy-Item $msixFile.FullName "rmtPocketWatcher-Windows-v$version.msix" -Force
Write-Host "Created rmtPocketWatcher-Windows-v$version.msix"
}
# Export certificate for user installation (if certificate exists)
if (Test-Path "certificates\rmtPocketWatcher.pfx") {
Write-Host "Exporting certificate for user installation..."
try {
# Use PowerShell to export the certificate
$pfxPath = "certificates\rmtPocketWatcher.pfx"
$cerPath = "rmtPocketWatcher-Certificate.cer"
$certPassword = if ($env:CERT_PASSWORD) { $env:CERT_PASSWORD } else { "rmtPocketWatcher2024!" }
# Load PFX and export public certificate
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($pfxPath, $certPassword)
$certBytes = $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert)
[System.IO.File]::WriteAllBytes($cerPath, $certBytes)
Write-Host "✅ Certificate exported: $cerPath" -ForegroundColor Green
} catch {
Write-Warning "Failed to export certificate: $($_.Exception.Message)"
}
}
# List created artifacts
Write-Host "Artifacts created:"
Get-ChildItem -Filter "*.zip" | ForEach-Object { Write-Host " - $($_.Name)" }
Get-ChildItem -Filter "*Portable*.exe" | ForEach-Object { Write-Host " - $($_.Name)" }
Get-ChildItem -Filter "*.msix" | ForEach-Object { Write-Host " - $($_.Name)" }
Get-ChildItem -Filter "*.cer" | ForEach-Object { Write-Host " - $($_.Name)" }
- name: Upload Windows artifacts
uses: actions/upload-artifact@v3
@@ -126,8 +160,9 @@ jobs:
name: rmtPocketWatcher-Windows
path: |
flutter_app/rmtPocketWatcher-Windows-v${{ needs.get-version.outputs.version }}.zip
flutter_app/rmtPocketWatcher-Windows-Portable-v${{ needs.get-version.outputs.version }}.zip
flutter_app/build/windows/x64/runner/Release/*.msix
flutter_app/rmtPocketWatcher-Windows-Portable-v${{ needs.get-version.outputs.version }}.exe
flutter_app/rmtPocketWatcher-Windows-v${{ needs.get-version.outputs.version }}.msix
flutter_app/rmtPocketWatcher-Certificate.cer
retention-days: 30
build-android:
@@ -147,7 +182,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
cache: false
- name: Setup Android SDK
uses: android-actions/setup-android@v3
@@ -169,6 +204,8 @@ jobs:
run: |
echo "WS_URL=$WS_URL" > .env
echo "API_URL=$API_URL" >> .env
echo "Created .env file:"
cat .env | sed 's/=.*/=***/' # Show keys but mask values
- name: Install dependencies
working-directory: flutter_app
@@ -178,7 +215,7 @@ jobs:
- name: Build Android APK
working-directory: flutter_app
shell: bash
run: flutter build apk --release
run: flutter build apk --release --verbose
- name: Rename APK
working-directory: flutter_app
@@ -226,8 +263,9 @@ jobs:
### Downloads
- **Windows (Full)**: `rmtPocketWatcher-Windows-v${{ needs.get-version.outputs.version }}.zip` - Complete standalone package
- **Windows (Portable)**: `rmtPocketWatcher-Windows-Portable-v${{ needs.get-version.outputs.version }}.zip` - Single executable only
- **Windows (Installer)**: `*.msix` - Windows Store-style installer (if available)
- **Windows (Portable)**: `rmtPocketWatcher-Windows-Portable-v${{ needs.get-version.outputs.version }}.exe` - Single self-extracting executable
- **Windows (Installer)**: `rmtPocketWatcher-Windows-v${{ needs.get-version.outputs.version }}.msix` - Windows Store-style installer
- **Certificate**: `rmtPocketWatcher-Certificate.cer` - Required for signed executables (see installation notes)
- **Android**: `rmtPocketWatcher-Android-v${{ needs.get-version.outputs.version }}.apk`
### Features
@@ -239,8 +277,18 @@ jobs:
- Vendor comparison tables
### Installation
#### Certificate Installation (Required for signed executables)
If Windows shows "Unknown publisher" warnings, install the certificate first:
1. Download `rmtPocketWatcher-Certificate.cer`
2. Right-click → "Install Certificate"
3. Choose "Local Machine" → "Place all certificates in the following store"
4. Browse → Select "Trusted Root Certification Authorities" → OK
5. Complete the installation
#### Application Installation
**Windows (Full)**: Extract the ZIP file and run `rmtpocketwatcher.exe` - includes all dependencies
**Windows (Portable)**: Single executable, no installation needed - just run `rmtpocketwatcher.exe`
**Windows (Portable)**: Just run the .exe - auto-extracts to AppData and launches
**Windows (Installer)**: Double-click the MSIX file for Windows Store-style installation
**Android**: Install the APK file (enable "Install from unknown sources")
@@ -248,8 +296,9 @@ jobs:
*Built with Flutter for cross-platform compatibility*
files: |
./artifacts/rmtPocketWatcher-Windows-v${{ needs.get-version.outputs.version }}.zip
./artifacts/rmtPocketWatcher-Windows-Portable-v${{ needs.get-version.outputs.version }}.zip
./artifacts/*.msix
./artifacts/rmtPocketWatcher-Windows-Portable-v${{ needs.get-version.outputs.version }}.exe
./artifacts/rmtPocketWatcher-Windows-v${{ needs.get-version.outputs.version }}.msix
./artifacts/rmtPocketWatcher-Certificate.cer
./artifacts/rmtPocketWatcher-Android-v${{ needs.get-version.outputs.version }}.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}