Simplify action workflows

This commit is contained in:
arkon 2021-10-09 15:19:22 -04:00
parent 300bb7cbae
commit 4647bc12c7
3 changed files with 19 additions and 46 deletions

View File

@ -4,20 +4,8 @@ on:
pull_request:
jobs:
check_wrapper:
name: Validate Gradle Wrapper
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
build:
name: Build pull request
needs: check_wrapper
runs-on: ubuntu-latest
steps:
@ -31,6 +19,9 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v1
with:
@ -48,7 +39,7 @@ jobs:
- name: Build project
uses: eskatos/gradle-command-action@v1
with:
arguments: :server:shadowJar --stacktrace
wrapper-cache-enabled: true
arguments: :server:shadowJar
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
configuration-cache-enabled: true

View File

@ -6,20 +6,8 @@ on:
- master
jobs:
check_wrapper:
name: Validate Gradle Wrapper
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
build:
name: Build project
needs: check_wrapper
runs-on: ubuntu-latest
steps:
@ -28,9 +16,12 @@ jobs:
with:
access_token: ${{ github.token }}
- name: Checkout master branch
- name: Clone repo
uses: actions/checkout@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v1
with:
@ -48,7 +39,7 @@ jobs:
- name: Build project
uses: eskatos/gradle-command-action@v1
with:
arguments: :server:shadowJar --stacktrace
wrapper-cache-enabled: true
arguments: :server:shadowJar
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
configuration-cache-enabled: true

View File

@ -6,20 +6,8 @@ on:
- 'v*'
jobs:
check_wrapper:
name: Validate Gradle Wrapper
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
build:
name: Build artifacts and create draft release
needs: check_wrapper
runs-on: ubuntu-latest
steps:
@ -33,6 +21,9 @@ jobs:
with:
ref: ${{ github.ref }}
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v1
with:
@ -50,8 +41,8 @@ jobs:
- name: Build project
uses: eskatos/gradle-command-action@v1
with:
arguments: :server:shadowJar --stacktrace
wrapper-cache-enabled: true
arguments: :server:shadowJar
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
@ -63,4 +54,4 @@ jobs:
file: "server/build/*.jar"
tags: true
draft: true
verbose: true
verbose: true