From a33afef96fc5d051b27ffc81f2bb429585b3488a Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Mon, 26 Apr 2021 15:28:10 +0200 Subject: [PATCH] Bump GH actions and fix gradle caching (#1440) --- .github/release-drafter.yml | 8 -------- .github/workflows/build.yml | 20 ++++++++------------ .github/workflows/check-formatting.yml | 13 ++++++++++++- .github/workflows/generate-javadocs.yml | 13 ++++++++++++- .github/workflows/release-drafter.yml | 15 --------------- 5 files changed, 32 insertions(+), 37 deletions(-) delete mode 100644 .github/release-drafter.yml delete mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 0589ae0ca4..0000000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,8 +0,0 @@ -template: | - ## What’s Changed - - $CHANGES - - Packages were released on [mavenCentral](https://repo.maven.apache.org/maven2/io/sentry/) - - We'd love to get feedback. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7c0e4cf22c..0cca3ed907 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,19 +29,15 @@ jobs: distribution: 'adopt' java-version: '8' - # use sequential key when bumping dependencies till single lock file is out of preview - # https://docs.gradle.org/current/userguide/dependency_locking.html#single_lock_file_per_project - - name: Cache Gradle Caches - uses: actions/cache@v1 + - name: Cache Gradle packages + uses: actions/cache@v2 with: - path: ~/.gradle/caches/ - key: cache-gradle-cache-3 - - - name: Cache Gradle Wrapper - uses: actions/cache@v1 - with: - path: ~/.gradle/wrapper/ - key: cache-gradle-wrapper-3 + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- # Clean, check formatting, build and do a dry release - name: Make all diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index 1a38073692..f04193af68 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -12,11 +12,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v2.3.1 + uses: actions/checkout@v2 - name: set up JDK 1.8 uses: actions/setup-java@v2 with: distribution: 'adopt' java-version: '8' + + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Check formatting with Spotless run: make checkFormat diff --git a/.github/workflows/generate-javadocs.yml b/.github/workflows/generate-javadocs.yml index 599b879329..aad94f9089 100644 --- a/.github/workflows/generate-javadocs.yml +++ b/.github/workflows/generate-javadocs.yml @@ -9,12 +9,23 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v2.3.1 + uses: actions/checkout@v2 - name: set up JDK 1.8 uses: actions/setup-java@v2 with: distribution: 'adopt' java-version: '8' + + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Generate Aggregate Javadocs run: | ./gradlew aggregateJavadocs diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 81b890f483..0000000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: "Release Drafter" - -on: - push: - branches: - - main - -jobs: - update_release_draft: - runs-on: ubuntu-latest - steps: - # Drafts your next Release notes as Pull Requests are merged into "main" - - uses: release-drafter/release-drafter@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}