From d61c62540aed9c8f756c4745a756824442650a4c Mon Sep 17 00:00:00 2001 From: freetlab Date: Fri, 28 Aug 2026 23:52:16 +0200 Subject: [PATCH] ci: name build artifacts by branch and version code [version set] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every build of a given semver was published as `pluriwave-v1.3.0.aab` into the same folder, so main and PRO overwrote each other and three different builds became indistinguishable once downloaded — the browser saves them as "(1)", "(2)" and the version code is only visible by unzipping the bundle. That cost two rejected uploads to Play Console for reusing a version code. Artifacts are now `pluriwave--v+.", which identifies itself weeks later and outside this repo. --- .gitea/workflows/build.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index aebdc2b..1fbbb19 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -237,11 +237,24 @@ jobs: - name: Build AAB release run: flutter build appbundle --release + # El nombre lleva RAMA y CÓDIGO DE VERSIÓN, no solo el semver. + # + # Antes, cada build de 1.3.0 se llamaba `pluriwave-v1.3.0.aab` y caía en + # la misma carpeta, así que main y PRO se pisaban y tres builds distintos + # eran indistinguibles una vez descargados: el navegador los guarda como + # "(1)", "(2)"... y ya no se sabe cuál es cuál. Eso costó subir a Play + # Console un código de versión ya usado, dos veces. + # + # Con `pluriwave-PRO-v1.3.0+156.aab` el archivo se identifica solo, + # incluso semanas después y fuera de este repo. - name: Publicar en ftl-builds (Zimaboard) run: | VERSION="${{ steps.version.outputs.version }}" - APK_NOMBRE="pluriwave-v${VERSION}.apk" - AAB_NOMBRE="pluriwave-v${VERSION}.aab" + BUILD_NUMBER="${{ steps.version.outputs.build_number }}" + BRANCH="${CURRENT_REF#refs/heads/}" + ETIQUETA="${BRANCH}-v${VERSION}+${BUILD_NUMBER}" + APK_NOMBRE="pluriwave-${ETIQUETA}.apk" + AAB_NOMBRE="pluriwave-${ETIQUETA}.aab" DESTINO="/opt/ftl-builds/builds/pluriwave/v${VERSION}" SSH_KEY="/Users/freetlab/.openclaw/workspace/.secure/zimaboard_ed25519" @@ -252,8 +265,8 @@ jobs: scp -i "$SSH_KEY" -o StrictHostKeyChecking=no \ build/app/outputs/bundle/release/app-release.aab \ "ShanaiaBot@192.168.0.33:${DESTINO}/${AAB_NOMBRE}" - echo "✅ APK: builds.freetimelab.es → pluriwave → v${VERSION}" - echo "✅ AAB: builds.freetimelab.es → pluriwave → v${VERSION}" + echo "✅ APK: builds.freetimelab.es → pluriwave → v${VERSION} → ${APK_NOMBRE}" + echo "✅ AAB: builds.freetimelab.es → pluriwave → v${VERSION} → ${AAB_NOMBRE}" - name: Preparar credenciales de Google Play if: ${{ gitea.ref == 'refs/heads/PRO' }}