Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
parent
c4b00aa9a5
commit
9273b4b168
1 changed files with 42 additions and 17 deletions
|
@ -1,21 +1,46 @@
|
|||
on: [ push ]
|
||||
jobs:
|
||||
build_and_publish:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: gradle
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout project sources
|
||||
uses: actions/checkout@v3
|
||||
- name: Clean Caches
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
rm -f .gradle/caches/modules-2/modules-2.lock
|
||||
rm -fr .gradle/caches/*/plugin-resolution/
|
||||
- name: Export Gradle User Home
|
||||
uses: export GRADLE_USER_HOME=`pwd`/.gradle
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v2
|
||||
- name: Run shadowJar
|
||||
run: gradle shadowJar
|
||||
- name: Run publish
|
||||
run: gradle publish
|
||||
./gradlew clean
|
||||
./gradlew shadowJar
|
||||
env:
|
||||
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: ubuntu-latest
|
||||
|
||||
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
|
||||
working-directory: ${{ github.workspace }}
|
||||
|
|
Loading…
Reference in a new issue