Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
parent
eb7ac71dd5
commit
f3497f9a2b
1 changed files with 15 additions and 35 deletions
|
@ -1,46 +1,26 @@
|
||||||
on: [ push ]
|
on: [ push ]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build_and_publish:
|
||||||
name: Build
|
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: gradle
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout project sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up JDK
|
- name: Clean Caches
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: |
|
run: |
|
||||||
./gradlew clean
|
rm -f .gradle/caches/modules-2/modules-2.lock
|
||||||
./gradlew shadowJar
|
rm -fr .gradle/caches/*/plugin-resolution/
|
||||||
|
|
||||||
|
- name: Setup Gradle User Home
|
||||||
|
run: export GRADLE_USER_HOME=`pwd`/.gradle
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
args: shadowJar publish
|
||||||
env:
|
env:
|
||||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||||
GRADLE_USER_HOME: ${{ github.workspace }}/.gradle
|
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
|
||||||
working-directory: ${{ github.workspace }}
|
|
||||||
|
|
||||||
publish:
|
|
||||||
name: Publish
|
|
||||||
needs: build
|
|
||||||
runs-on: docker
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up JDK
|
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
|
|
||||||
- name: Publish with Gradle
|
|
||||||
run: |
|
|
||||||
./gradlew publish
|
|
||||||
env:
|
|
||||||
GRADLE_USER_HOME: ${{ github.workspace }}/.gradle
|
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
|
|
Loading…
Reference in a new issue