Jenkinsfile: build aab on release branch

This commit is contained in:
2025-09-06 16:59:38 +02:00
parent a4b691f8be
commit df1c5d9acf
2 changed files with 21 additions and 0 deletions

18
Jenkinsfile vendored
View File

@@ -16,6 +16,7 @@ pipeline {
}
}
}
stage('Decrypt main keys') {
when {
branch 'main'
@@ -40,6 +41,7 @@ pipeline {
'''
}
}
stage('Clone submodules') {
steps {
script {
@@ -47,6 +49,7 @@ pipeline {
}
}
}
stage('Modify firka_bundle.dart') {
when {
branch 'main'
@@ -72,11 +75,13 @@ pipeline {
}
}
}
stage('Build firka') {
steps {
sh 'bash -c "./tools/linux/build_apk.sh ' + env.BRANCH_NAME + '"'
}
}
stage('Rename Release APKs') {
when {
branch 'main'
@@ -109,6 +114,7 @@ pipeline {
}
}
}
stage('Calculate Version Code') {
steps {
script {
@@ -137,6 +143,7 @@ pipeline {
}
}
}
stage('Upload to F-Droid Debug') {
when {
branch 'dev'
@@ -165,6 +172,17 @@ pipeline {
}
}
}
stage('Publish release artifacts') {
when {
branch 'main'
}
steps {
archiveArtifacts artifacts: 'firka/build/app/outputs/bundle/release/*.aab', fingerprint: true
sh 'rm firka/build/app/outputs/bundle/release/*.aab'
}
}
stage('Upload to F-Droid Release') {
when {
branch 'main'

View File

@@ -102,6 +102,9 @@ if [ "$1" = "main" ]; then
echo "All builds completed successfully!"
ls -la build/app/outputs/flutter-apk/
echo "Building aab for playstore"
flutter build appbundle
else
echo "$HOME/.flutter_path not found!"
exit 1