From 9bdea8017d272cfd5ce7511472a1d88d41ed8abe Mon Sep 17 00:00:00 2001 From: "karming.wan" <31875755+wkm97@users.noreply.github.com> Date: Sun, 29 May 2022 23:25:55 +0800 Subject: [PATCH] chore: added github action CI (#97) * chore: added github action CI * chore: added github action CI for main * chore: renamed files * chore: changed name --- .github/workflows/ci_main.yml | 21 +++++++++++++++++++++ .github/workflows/ci_pr.yml | 18 ++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/ci_main.yml create mode 100644 .github/workflows/ci_pr.yml diff --git a/.github/workflows/ci_main.yml b/.github/workflows/ci_main.yml new file mode 100644 index 0000000..25e85e9 --- /dev/null +++ b/.github/workflows/ci_main.yml @@ -0,0 +1,21 @@ +name: CI on main +on: + push: + branches: + - "main" +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Execute Gradle build + run: ./gradlew clean build \ No newline at end of file diff --git a/.github/workflows/ci_pr.yml b/.github/workflows/ci_pr.yml new file mode 100644 index 0000000..99fc8ad --- /dev/null +++ b/.github/workflows/ci_pr.yml @@ -0,0 +1,18 @@ +name: CI on PR +on: pull_request +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Execute Gradle build + run: ./gradlew clean build \ No newline at end of file