v1.5.0-hotfix3: Decode keystore in workflow

This commit is contained in:
zarzet
2026-01-02 04:09:49 +07:00
parent 6d5c9d0f91
commit 4caa803eb2
6 changed files with 19 additions and 13 deletions

View File

@@ -86,10 +86,16 @@ jobs:
- name: Generate app icons
run: dart run flutter_launcher_icons
- name: Decode Keystore
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/app/ci-keystore.jks
ls -la android/app/ci-keystore.jks
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
- name: Build APK (Release)
run: flutter build apk --release --split-per-abi
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}

View File

@@ -1,5 +1,10 @@
# Changelog
## [1.5.0-hotfix3] - 2026-01-02
### Fixed
- **App Signing**: Decode keystore in workflow before Gradle evaluation
## [1.5.0-hotfix2] - 2026-01-02
### Fixed

Binary file not shown.

View File

@@ -5,20 +5,15 @@ plugins {
id("dev.flutter.flutter-gradle-plugin")
}
// Load keystore properties from file if exists
// Load keystore properties from file if exists (local build)
val keystorePropertiesFile = rootProject.file("keystore.properties")
val keystoreProperties = java.util.Properties()
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(java.io.FileInputStream(keystorePropertiesFile))
}
// Decode keystore from base64 if running in CI
val ciKeystoreFile = file("${project.projectDir}/ci-keystore.jks")
if (System.getenv("KEYSTORE_BASE64") != null && !ciKeystoreFile.exists()) {
ciKeystoreFile.writeBytes(
java.util.Base64.getDecoder().decode(System.getenv("KEYSTORE_BASE64"))
)
}
// CI keystore file (decoded by workflow)
val ciKeystoreFile = file("ci-keystore.jks")
android {
namespace = "com.zarz.spotiflac"
@@ -46,7 +41,7 @@ android {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
} else if (ciKeystoreFile.exists()) {
// CI/CD build: use decoded keystore
// CI/CD build: use decoded keystore from workflow
storeFile = ciKeystoreFile
storePassword = System.getenv("KEYSTORE_PASSWORD")
keyAlias = System.getenv("KEY_ALIAS")

View File

@@ -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-hotfix2';
static const String buildNumber = '16';
static const String version = '1.5.0-hotfix3';
static const String buildNumber = '17';
static const String fullVersion = '$version+$buildNumber';
static const String appName = 'SpotiFLAC';

View File

@@ -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+16
version: 1.5.0+17
environment:
sdk: ^3.10.0