diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0eadd95c..d27d1483 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,19 +86,18 @@ jobs: - name: Generate app icons run: dart run flutter_launcher_icons - - name: Decode Keystore + - name: Setup Keystore run: | echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/app/ci-keystore.jks + echo "storeFile=ci-keystore.jks" > android/keystore.properties + echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> android/keystore.properties + echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/keystore.properties + echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/keystore.properties ls -la android/app/ci-keystore.jks - env: - KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }} + cat android/keystore.properties | head -1 - name: Build APK (Release) run: flutter build apk --release --split-per-abi - env: - KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} - KEY_ALIAS: ${{ secrets.KEY_ALIAS }} - KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} - name: Rename APKs run: | diff --git a/SpotiFLAC-v1.5.0-hotfix3-arm64.apk b/SpotiFLAC-v1.5.0-hotfix3-arm64.apk new file mode 100644 index 00000000..3841c773 Binary files /dev/null and b/SpotiFLAC-v1.5.0-hotfix3-arm64.apk differ diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 99305d9f..40c86544 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -5,16 +5,13 @@ plugins { id("dev.flutter.flutter-gradle-plugin") } -// Load keystore properties from file if exists (local build) +// Load keystore properties from file if exists val keystorePropertiesFile = rootProject.file("keystore.properties") val keystoreProperties = java.util.Properties() if (keystorePropertiesFile.exists()) { keystoreProperties.load(java.io.FileInputStream(keystorePropertiesFile)) } -// CI keystore file (decoded by workflow) -val ciKeystoreFile = file("ci-keystore.jks") - android { namespace = "com.zarz.spotiflac" compileSdk = flutter.compileSdkVersion @@ -33,19 +30,12 @@ android { } signingConfigs { - create("release") { - if (keystorePropertiesFile.exists()) { - // Local build: use keystore.properties - storeFile = file(keystoreProperties["storeFile"] as String) + if (keystorePropertiesFile.exists()) { + create("release") { + storeFile = file("app/${keystoreProperties["storeFile"]}") storePassword = keystoreProperties["storePassword"] as String keyAlias = keystoreProperties["keyAlias"] as String keyPassword = keystoreProperties["keyPassword"] as String - } else if (ciKeystoreFile.exists()) { - // CI/CD build: use decoded keystore from workflow - storeFile = ciKeystoreFile - storePassword = System.getenv("KEYSTORE_PASSWORD") - keyAlias = System.getenv("KEY_ALIAS") - keyPassword = System.getenv("KEY_PASSWORD") } } } @@ -68,7 +58,7 @@ android { buildTypes { release { // Use release signing config if available, otherwise fall back to debug - signingConfig = if (signingConfigs.findByName("release")?.storeFile != null) { + signingConfig = if (keystorePropertiesFile.exists()) { signingConfigs.getByName("release") } else { signingConfigs.getByName("debug") diff --git a/lib/constants/app_info.dart b/lib/constants/app_info.dart index 5cb18e99..7be161ec 100644 --- a/lib/constants/app_info.dart +++ b/lib/constants/app_info.dart @@ -1,8 +1,8 @@ /// App version and info constants /// Update version here only - all other files will reference this class AppInfo { - static const String version = '1.5.0-hotfix3'; - static const String buildNumber = '17'; + static const String version = '1.5.0-hotfix4'; + static const String buildNumber = '18'; static const String fullVersion = '$version+$buildNumber'; static const String appName = 'SpotiFLAC'; diff --git a/pubspec.yaml b/pubspec.yaml index 8da1322c..3f685ea8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: spotiflac_android description: Download Spotify tracks in FLAC from Tidal, Qobuz & Amazon Music publish_to: 'none' -version: 1.5.0+17 +version: 1.5.0+18 environment: sdk: ^3.10.0