From 279423accf9b1ffbc8f71497d3d7e2dd2b7c87ed Mon Sep 17 00:00:00 2001 From: heliannuuthus Date: Mon, 11 Mar 2024 20:59:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Github=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle-ci.yml | 22 ++++++++++++++++++++++ build.gradle | 24 ++++-------------------- gradle.properties | 2 ++ 3 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/gradle-ci.yml create mode 100644 gradle.properties diff --git a/.github/workflows/gradle-ci.yml b/.github/workflows/gradle-ci.yml new file mode 100644 index 0000000..d0ca97b --- /dev/null +++ b/.github/workflows/gradle-ci.yml @@ -0,0 +1,22 @@ +on: + pull_request: + types: [ opened, reopened, synchronize ] + +jobs: + lint: + uses: heliannuuthus/integration-deploy/.github/workflows/call-gradle-lint.yml + + build: + needs: lint + uses: heliannuuthus/integration-deploy/.github/workflows/call-gradle-build.yml + + publish: + needs: build + permissions: + contents: read + packages: write + uses: heliannuuthus/integration-deploy/.github/workflows/call-gradle-publish.yml + with: + user: ${{ github.actor }} + secrets: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle b/build.gradle index 4306a8a..1df8f90 100644 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,12 @@ plugins { id "io.spring.dependency-management" version "1.1.4" id "org.springdoc.openapi-gradle-plugin" version "1.8.0" id "io.freefair.lombok" version "8.6" + id 'me.qoomon.git-versioning' version '6.4.2' + id "com.diffplug.spotless" version "6.25.0" } +apply from: "https://cdn.jsdelivr.net/gh/heliannuuthus/integration-deploy/gradle/multi-library.gradle" + ext { openapiVersion = "2.3.0" @@ -23,26 +27,6 @@ allprojects { } subprojects { - apply plugin: "java-library" apply plugin: "org.springframework.boot" apply plugin: "io.spring.dependency-management" - apply plugin: "io.freefair.lombok" - - - jar { - enabled = true - } - - configurations { - all*.exclude module: "spring-boot-starter-logging" - } -} - -dependencies { - testImplementation platform("org.junit:junit-bom:5.9.1") - testImplementation "org.junit.jupiter:junit-jupiter" -} - -test { - useJUnitPlatform() } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..f086126 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +groups=ghrc.io +version=0.1.0 \ No newline at end of file