diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1a37b73f..d1b07b17 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,10 +11,32 @@ jobs: java: [8, 11, 14] fail-fast: false steps: - - uses: "actions/checkout@master" - - uses: "actions/setup-java@master" + - name: "Checkout repo" + uses: "actions/checkout@v2" + with: + fetch-depth: 0 + - name: "Fetch all tags" + run: "git fetch origin +refs/tags/*:refs/tags/*" + - name: "Setup Java ${{ matrix.java }}" + uses: "actions/setup-java@v1" with: java-version: ${{ matrix.java }} - - uses: gradle/wrapper-validation-action@v1 + - name: "Validate Gradle Wrapper" + uses: gradle/wrapper-validation-action@v1 + - name: "Cache Gradle wrapper" + uses: "actions/cache@v1" + with: + path: "~/.gradle/wrapper" + key: "gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}" + - name: "Cache Gradle welcome message" + uses: "actions/cache@v1" + with: + path: "~/.gradle/notifications" + key: "gradle-notifications-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}" + - name: "Cache Gradle dependencies" + uses: "actions/cache@v1" + with: + path: "~/.gradle/caches" + key: "gradle-caches-${{ runner.os }}-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}" - name: "Gradle check" - run: "./gradlew check" + run: "./gradlew check --continue" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a8aa100f..955bbaa0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,19 +10,64 @@ jobs: java: [8, 11, 14] fail-fast: false steps: - - uses: "actions/checkout@master" - - uses: "actions/setup-java@master" + - name: "Checkout repo" + uses: "actions/checkout@v2" + with: + fetch-depth: 0 + - name: "Fetch all tags" + run: "git fetch origin +refs/tags/*:refs/tags/*" + - name: "Setup Java ${{ matrix.java }}" + uses: "actions/setup-java@v1" with: java-version: ${{ matrix.java }} - - run: "./gradlew check --continue" + - name: "Validate Gradle Wrapper" + uses: gradle/wrapper-validation-action@v1 + - name: "Cache Gradle wrapper" + uses: "actions/cache@v1" + with: + path: "~/.gradle/wrapper" + key: "gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}" + - name: "Cache Gradle welcome message" + uses: "actions/cache@v1" + with: + path: "~/.gradle/notifications" + key: "gradle-notifications-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}" + - name: "Cache Gradle dependencies" + uses: "actions/cache@v1" + with: + path: "~/.gradle/caches" + key: "gradle-caches-${{ runner.os }}-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}" + - name: "Gradle check" + run: "./gradlew check --continue" publish: runs-on: ubuntu-latest needs: check steps: - - uses: "actions/checkout@master" - - uses: "actions/setup-java@master" + - name: "Checkout repo" + uses: "actions/checkout@v2" + with: + fetch-depth: 0 + - name: "Fetch all tags" + run: "git fetch origin +refs/tags/*:refs/tags/*" + - name: "Setup Java" + uses: "actions/setup-java@v1" with: java-version: 8 + - name: "Cache Gradle wrapper" + uses: "actions/cache@v1" + with: + path: "~/.gradle/wrapper" + key: "gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}" + - name: "Cache Gradle welcome message" + uses: "actions/cache@v1" + with: + path: "~/.gradle/notifications" + key: "gradle-notifications-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}" + - name: "Cache Gradle dependencies" + uses: "actions/cache@v1" + with: + path: "~/.gradle/caches" + key: "gradle-caches-${{ runner.os }}-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}" - name: "Gradle publish" env: BINTRAY_USER: ${{ secrets.BINTRAY_USER }}