From d66af7dc8eb9e3e04aa9b9480e0f8728460da584 Mon Sep 17 00:00:00 2001 From: Bob Pan Date: Thu, 31 Aug 2023 21:20:00 +0800 Subject: [PATCH] update github actions (#597) * Update GitHub Actions --------- Co-authored-by: Nico Mexis --- .github/workflows/gradle.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 48602b2cd..c7f3fd7fe 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,13 +1,14 @@ -# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle name: Java CI with Gradle on: push: branches: [ 2.x ] + tags: + - v* pull_request: branches: [ 2.x ] + workflow_dispatch: jobs: build: @@ -15,14 +16,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 8 - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - name: Set up JDK 1.8 + uses: actions/setup-java@v3 with: java-version: '8' - distribution: 'adopt' - cache: gradle - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle + distribution: 'temurin' + cache: 'gradle' + - name: Build dex-tools with Gradle run: ./gradlew check distZip + + - name: Archive dex tools + uses: actions/upload-artifact@v3 + if: success() + with: + name: dex-tools-2.2-SNAPSHOT + path: dex-tools/build/distributions/dex-tools-2.2-SNAPSHOT.zip