diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index c872dc8..4406719 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,8 +1,6 @@ name: Run test on: - push: - branches: [ "main" ] pull_request: branches: [ "main" ] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..804c974 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,71 @@ +name: Deploy To Google Play + +on: + push: + branches: [main] + +jobs: + test: + name: Unit Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup JDK 17 + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: 17 + cache: 'gradle' + + - name: Grant execute permissions for gradlew + run: chmod +x gradlew + + - name: Run unit tests + run: ./gradlew clean testDebug + + distribute: + name: Distribute bundle to Google Play + needs: test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup JDK 17 + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: 17 + cache: 'gradle' + + - name: Version Bump + uses: chkfung/android-version-actions@v1.2.3 + with: + gradlePath: app/build.gradle.kts + versionCode: ${{ github.run_number }} + + - name: Assemble Release Bundle + run: ./gradlew bundleRelease + + - name: Sign Release + uses: r0adkll/sign-android-release@v1 + with: + releaseDirectory: app/build/outputs/bundle/release + signingKeyBase64: ${{ secrets.ANDROID_KEYSTORE }} + keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }} + alias: ${{ secrets.ANDROID_DEVS_ALIAS }} + keyPassword: ${{ secrets.ANDROID_DEVS_ALIAS_PASSWORD }} + + - name: Setup Authorization with Google Play Store + run: echo '${{ secrets.PLAY_AUTH_JSON }}' > service_account.json + + - name: Deploy bundle to Google Play + uses: r0adkll/upload-google-play@V1.1.3 + with: + serviceAccountJson: service_account.json + packageName: com.sync.syncroid_sftp + releaseFiles: app/build/outputs/bundle/release/app-release.aab + track: internal + status: 'completed' + whatsNewDirectory: whatsNew/ \ No newline at end of file diff --git a/app/release/app-release.aab b/app/release/app-release.aab new file mode 100644 index 0000000..6ca2b60 Binary files /dev/null and b/app/release/app-release.aab differ diff --git a/app/src/main/java/com/sync/syncroid_sftp/service/ServerStorageService.kt b/app/src/main/java/com/sync/syncroid_sftp/service/ServerStorageService.kt index 904d8bb..9867125 100644 --- a/app/src/main/java/com/sync/syncroid_sftp/service/ServerStorageService.kt +++ b/app/src/main/java/com/sync/syncroid_sftp/service/ServerStorageService.kt @@ -23,11 +23,12 @@ class ServerStorageService( var session: Session? = null return try { - // Utilisation de l'instance injectée jsch, pas de nouvelle instanciation + session = jsch.getSession(serverStorage.username, serverStorage.host, serverStorage.port) session.setPassword(serverStorage.password) val config = java.util.Properties() + // TODO put yes config["StrictHostKeyChecking"] = "no" session.setConfig(config) @@ -63,6 +64,7 @@ class ServerStorageService( session.setPassword(server.password) val config = java.util.Properties() + // TODO put yes config["StrictHostKeyChecking"] = "no" session.setConfig(config) diff --git a/whatsNew/whatsnew-en-US b/whatsNew/whatsnew-en-US new file mode 100644 index 0000000..aa949b4 --- /dev/null +++ b/whatsNew/whatsnew-en-US @@ -0,0 +1 @@ +Initial Release \ No newline at end of file