diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml new file mode 100644 index 00000000..0dc7989e --- /dev/null +++ b/.github/workflows/production.yml @@ -0,0 +1,56 @@ +name: Deploy App CI + +on: + push: + branches: [ master ] + tags: '*' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Grant rights + run: chmod +x build.gradle + + - name: Build with Gradle + id: build + run: ./gradlew build + + - name: Build Release AAB + id: buildRelease + run: ./gradlew bundleRelease + + - name: Sign AAB + id: sign + uses: r0adkll/sign-android-release@v1 + with: + releaseDirectory: app/build/outputs/bundle/release + signingKeyBase64: ${{ secrets.SIGNING_KEY }} + alias: ${{ secrets.ALIAS }} + keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} + keyPassword: ${{ secrets.KEY_PASSWORD }} + + - name: Create service_account.json + id: createServiceAccount + run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json + + - name: Deploy to Play Store (BETA) + id: deploy + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJson: service_account.json + packageName: com.yogeshpaliyal.keypass + releaseFile: app/build/outputs/bundle/release/app-release.aab + track: internalsharing + whatsNewDirectory: whatsnew/