name: Build

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Build and test
        run: |
          ./gradlew assembleDebug checkstyle lintDebug --stacktrace

      - name: Publish sample app
        if: github.event_name == 'push'
        env:
          ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
          UPLOAD_KEYSTORE_PWD: ${{ secrets.UPLOAD_KEYSTORE_PWD }}
        run: |
          git fetch --unshallow # Build number will be incorrect for shallow copy
          ./gradlew publishSample --stacktrace

name: Build

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Set up JDK 11
        uses: actions/setup-java@v1
        with:
          java-version: 11

      - name: Build and test
        run: |
          ./gradlew assembleDebug checkstyle lintDebug --stacktrace

      - name: Publish sample app
        if: github.event_name == 'push'
        env:
          ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
          UPLOAD_KEYSTORE_PWD: ${{ secrets.UPLOAD_KEYSTORE_PWD }}
        run: |
          git fetch --unshallow # Build number will be incorrect for shallow copy
          ./gradlew publishSample --stacktrace

Use Java 11 for GitHub Actions
Use Java 11 for GitHub Actions
