diff --git a/Jenkinsfile b/Jenkinsfile index 32a1283..f784511 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' diff --git a/tools/linux/build_apk.sh b/tools/linux/build_apk.sh index e42923b..402c745 100755 --- a/tools/linux/build_apk.sh +++ b/tools/linux/build_apk.sh @@ -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