From e22bf9118da241118ebd54738695e22d39b23331 Mon Sep 17 00:00:00 2001 From: SugarMGP <2350745751@qq.com> Date: Tue, 30 Jan 2024 20:38:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow_java.yml | 56 +++++++++-------------------- 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/.github/workflows/workflow_java.yml b/.github/workflows/workflow_java.yml index ba164b9..947d194 100644 --- a/.github/workflows/workflow_java.yml +++ b/.github/workflows/workflow_java.yml @@ -3,60 +3,38 @@ name: EOK Snapshot Build -on: - push: - branches: - - '1.12.2' - - '1.16' - pull_request: - branches: - - '1.12.2' - - '1.16' - workflow_dispatch: +on: [ push ] jobs: build: - runs-on: ubuntu-latest - steps: - - name: Clone CuckooLib repository - uses: actions/checkout@v2 - with: - repository: zi-jing/CuckooLib - ref: 1.12 - path: CuckooLib-1.12 - name: Clone EOK repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: EOK-1.12 + - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - uses: burrunan/gradle-cache-action@v1 - name: Cache .gradle - with: - # If you have multiple jobs, use distinct job-id in in case you want to split caches - # For instance, jobs with different JDK versions can't share caches - # RUNNER_OS is added to job-id automatically - job-id: eok + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'zulu' + cache: 'gradle' + - name: Copy gradle.properties run: cp ./EOK-1.12/.github/gradle.properties ./EOK-1.12/ - #- uses: axel-op/googlejavaformat-action@v3 - # with: - # args: "--skip-sorting-imports --replace" + - name: Grant execute permission for gradlew - run: chmod +x ./CuckooLib-1.12/gradlew && chmod +x ./EOK-1.12/gradlew + run: chmod +x ./EOK-1.12/gradlew + - name: CI Setup run: cd ./EOK-1.12/ && ./gradlew setupCIWorkspace + - name: Build run: cd ./EOK-1.12/ && ./gradlew build - - uses: actions/upload-artifact@v2 + + - name: Upload Artifact + uses: actions/upload-artifact@v3 with: - name: EOK snapshot + name: EOK Snapshot path: ./EOK-1.12/build/libs - - uses: actions/upload-artifact@v2 - with: - name: CuckooLib snapshot for EOK - path: ./CuckooLib-1.12/build/libs