diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..70513a6 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,72 @@ +name: Release APK +# Signature via les secrets d'org SHAARIT_* (Gitea Projets), publication vers +# le dépôt Nexus raw « suite-dracodev ». Mêmes clés que les APK publiés (0c6b95…). +on: + push: + tags: ["v*"] + workflow_dispatch: + inputs: + push_nexus: + description: "Pousser aussi l'APK vers Nexus suite-dracodev" + type: boolean + default: false + +env: + ANDROID_IMAGE: ghcr.io/cirruslabs/android-sdk:34 + +jobs: + release: + runs-on: ci-deepin + steps: + - uses: actions/checkout@v4 + + - name: Préparer la signature (keystore depuis secret) + run: | + printf '%s' "$KEYSTORE_B64" | base64 -d > shaarit-release.keystore + { + echo "storeFile=shaarit-release.keystore" + echo "storePassword=$STORE_PASSWORD" + echo "keyAlias=$KEY_ALIAS" + echo "keyPassword=$KEY_PASSWORD" + } > keystore.properties + env: + KEYSTORE_B64: ${{ secrets.SHAARIT_KEYSTORE_B64 }} + STORE_PASSWORD: ${{ secrets.SHAARIT_STORE_PASSWORD }} + KEY_ALIAS: ${{ secrets.SHAARIT_KEY_ALIAS }} + KEY_PASSWORD: ${{ secrets.SHAARIT_KEY_PASSWORD }} + + - name: Build + vérif signature (DinD) + run: | + docker rm -f sh-build 2>/dev/null || true + docker create --name sh-build -w /work "$ANDROID_IMAGE" \ + bash -c 'chmod +x gradlew && ./gradlew --no-daemon assembleRelease \ + && apksigner verify --print-certs $(find app/build/outputs/apk/release -name "*.apk" | head -1)' + docker cp . sh-build:/work + docker start -a sh-build + rc=$? + docker logs sh-build 2>&1 | tail -40 + docker cp sh-build:/work/app/build/outputs/apk/release/. ./apkout + docker rm -f sh-build + [ $rc -eq 0 ] || exit 1 + + - name: Nommer l'APK + run: | + VER=$(awk -F= '/^VERSION_NAME=/{print $2}' version.properties | tr -d '\r ') + APK=$(ls apkout/*.apk | head -1) + mv "$APK" "ShaarIt-$VER.apk" + rm -rf apkout + echo "APK=ShaarIt-$VER.apk" >> "$GITHUB_ENV" + + - uses: actions/upload-artifact@v3 + with: + name: shaarit-apk + path: ${{ env.APK }} + + - name: Publier vers Nexus suite-dracodev + if: startsWith(github.ref, 'refs/tags/v') || inputs.push_nexus + run: | + curl -fsS -u "$NEXUS_USER:$NEXUS_PASSWORD" -T "$APK" \ + "https://nexus.dracodev.net/repository/suite-dracodev/android/shaarit/$APK" + env: + NEXUS_USER: ${{ secrets.NEXUS_USER }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} diff --git a/version.properties b/version.properties index c3b329c..446165d 100644 --- a/version.properties +++ b/version.properties @@ -1,3 +1,3 @@ -#Wed Nov 04 09:00:00 2026 -VERSION_NAME=2.17.3 -VERSION_CODE=49 \ No newline at end of file +#Tue Nov 17 10:10:15 2026 +VERSION_NAME=2.17.4 +VERSION_CODE=50 \ No newline at end of file