Signing, Installer, New Workflows
Some checks failed
Flutter Release / get-version (push) Successful in 7s
Flutter Release / build-windows (push) Failing after 9s
Flutter Release / create-release (push) Has been cancelled
Flutter Release / build-android (push) Has been cancelled

This commit is contained in:
2025-12-15 00:05:29 -05:00
parent 9ff0d62651
commit 110c5d99a1
25 changed files with 2647 additions and 268 deletions

View File

@@ -20,13 +20,14 @@ jobs:
- name: Get version from pubspec.yaml
id: version
working-directory: flutter_app
shell: bash
run: |
VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //' | sed 's/+.*//')
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
build-windows:
runs-on: windows
runs-on: windows-latest
needs: get-version
steps:
- name: Checkout repository
@@ -40,46 +41,90 @@ jobs:
cache: true
- name: Enable Windows desktop
shell: pwsh
run: flutter config --enable-windows-desktop
- name: Create production .env file
working-directory: flutter_app
shell: pwsh
env:
WS_URL: ${{ secrets.WS_URL }}
API_URL: ${{ secrets.API_URL }}
run: |
echo "WS_URL=$env:WS_URL" > .env
echo "API_URL=$env:API_URL" >> .env
"WS_URL=$env:WS_URL" | Out-File -FilePath .env -Encoding utf8
"API_URL=$env:API_URL" | Out-File -FilePath .env -Append -Encoding utf8
- name: Install dependencies
working-directory: flutter_app
shell: pwsh
run: flutter pub get
- name: Flutter doctor
shell: pwsh
run: flutter doctor -v
- name: Build Windows release
working-directory: flutter_app
run: flutter build windows --release
- name: Create Windows archive
- name: Setup Certificate for Signing
working-directory: flutter_app
shell: pwsh
env:
CERT_BASE64: ${{ secrets.CERT_BASE64 }}
CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }}
run: |
Compress-Archive -Path "build\windows\x64\runner\Release\*" -DestinationPath "rmtPocketWatcher-Windows-v${{ needs.get-version.outputs.version }}.zip"
if ($env:CERT_BASE64) {
Write-Host "Setting up certificate for code signing..." -ForegroundColor Green
# Create certificates directory if it doesn't exist
if (-not (Test-Path "certificates")) {
New-Item -ItemType Directory -Path "certificates" -Force | Out-Null
}
# Decode base64 certificate and save as PFX
$certBytes = [System.Convert]::FromBase64String($env:CERT_BASE64)
[System.IO.File]::WriteAllBytes("certificates\rmtPocketWatcher.pfx", $certBytes)
Write-Host "✅ Certificate installed successfully" -ForegroundColor Green
} else {
Write-Host "⚠️ No certificate provided - building unsigned" -ForegroundColor Yellow
}
- name: Upload Windows artifact
- name: Build Windows release with installer
working-directory: flutter_app
shell: pwsh
env:
CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }}
run: |
# Set certificate password environment variable for build script
if ($env:CERT_PASSWORD) {
$env:MSIX_CERTIFICATE_PASSWORD = $env:CERT_PASSWORD
}
# Run our custom build script
.\build_windows.ps1 -Release
# Rename the archive to include version
$version = "${{ needs.get-version.outputs.version }}"
if (Test-Path "build\rmtPocketWatcher-Windows-Standalone.zip") {
Rename-Item "build\rmtPocketWatcher-Windows-Standalone.zip" "rmtPocketWatcher-Windows-v$version.zip"
}
# Also create a simple executable-only 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
}
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: rmtPocketWatcher-Windows
path: flutter_app/rmtPocketWatcher-Windows-v${{ needs.get-version.outputs.version }}.zip
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
retention-days: 30
build-android:
runs-on: ubuntu-latest
needs: get-version
env:
ANDROID_HOME: /opt/android-sdk-linux
ANDROID_SDK_ROOT: /opt/android-sdk-linux
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -89,18 +134,6 @@ jobs:
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 11076708
- name: Install Android SDK components
run: |
echo "Installing Android SDK components..."
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "platform-tools" "platforms;android-34" "build-tools;34.0.0"
echo "Android SDK setup complete"
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/latest/bin
- name: Setup Flutter
uses: subosito/flutter-action@v2
@@ -109,20 +142,16 @@ jobs:
channel: 'stable'
cache: true
- name: Accept Android licenses
run: yes | flutter doctor --android-licenses
- name: Verify Android SDK
- name: Setup Android SDK
shell: bash
run: |
echo "ANDROID_HOME: $ANDROID_HOME"
echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT"
ls -la $ANDROID_HOME || echo "ANDROID_HOME not found"
# Install Android SDK using Flutter's built-in tools
flutter doctor --android-licenses || echo "Licenses handled"
flutter doctor -v
- name: Flutter doctor
run: flutter doctor -v
- name: Create production .env file
working-directory: flutter_app
shell: bash
env:
WS_URL: ${{ secrets.WS_URL }}
API_URL: ${{ secrets.API_URL }}
@@ -132,24 +161,17 @@ jobs:
- name: Install dependencies
working-directory: flutter_app
shell: bash
run: flutter pub get
- name: Clean build
working-directory: flutter_app
run: flutter clean
- name: Build Android APK
working-directory: flutter_app
run: flutter build apk --release --verbose
- name: Verify APK exists
working-directory: flutter_app
run: |
ls -la build/app/outputs/flutter-apk/
file build/app/outputs/flutter-apk/app-release.apk
shell: bash
run: flutter build apk --release
- name: Rename APK
working-directory: flutter_app
shell: bash
run: |
cp build/app/outputs/flutter-apk/app-release.apk rmtPocketWatcher-Android-v${{ needs.get-version.outputs.version }}.apk
@@ -192,7 +214,9 @@ jobs:
**Lambda Banking Conglomerate** - Star Citizen AUEC Price Tracker
### Downloads
- **Windows**: `rmtPocketWatcher-Windows-v${{ needs.get-version.outputs.version }}.zip`
- **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)
- **Android**: `rmtPocketWatcher-Android-v${{ needs.get-version.outputs.version }}.apk`
### Features
@@ -204,13 +228,17 @@ jobs:
- Vendor comparison tables
### Installation
**Windows**: Extract the ZIP file and run `rmtpocketwatcher.exe`
**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 (Installer)**: Double-click the MSIX file for Windows Store-style installation
**Android**: Install the APK file (enable "Install from unknown sources")
---
*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-Android-v${{ needs.get-version.outputs.version }}.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}