From 85ca394f2152298d6349212d0f219f4c3701f3eb Mon Sep 17 00:00:00 2001 From: IzzelAliz Date: Sun, 25 Feb 2024 21:23:18 +0800 Subject: [PATCH] Update actions --- .github/workflows/gradle.yml | 9 ++++---- .github/workflows/pr.yml | 42 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1974a9946..ec1a9d953 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,15 +1,12 @@ # This workflow will build a Java project with Gradle # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle -name: Java CI with Gradle +name: Build on: push: branches: - '**' - pull_request: - branches: - - '**' jobs: build: @@ -35,8 +32,10 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build + env: + ARCLIGHT_FILES_TOKEN: ${{ secrets.ARCLIGHT_FILES_TOKEN }} run: | - ./gradlew cleanBuild build collect --no-daemon --stacktrace + ./gradlew cleanBuild build collect uploadFiles --no-daemon --stacktrace - name: Upload Artifact uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 000000000..4d8e3e9db --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,42 @@ +# This workflow will build a Java project with Gradle +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Pull Request Check + +on: + pull_request: + branches: + - '**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: '17' + - name: Cache Gradle User Files + uses: actions/cache@v1 + with: + path: ~/.gradle + key: ${{ runner.os }}-gradle-user-home + - name: Cache Gradle Files + uses: actions/cache@v1 + with: + path: ./.gradle + key: ${{ runner.os }}-gradle-file + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build + run: | + ./gradlew cleanBuild build collect --no-daemon --stacktrace + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: Arclight + path: ./build/libs/*.jar +