aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-06 11:26:07 +0200
committerGitHub <noreply@github.com>2022-06-06 11:26:07 +0200
commitd4bdebd64140649717c1bfbdf882dcc5aeeba066 (patch)
tree0766824753639bf39a98042e569ad57ea719e215 /.github
parent8b368ebb62ef48e14a69f149ccae25910ccb22ac (diff)
downloadOneConfig-d4bdebd64140649717c1bfbdf882dcc5aeeba066.tar.gz
OneConfig-d4bdebd64140649717c1bfbdf882dcc5aeeba066.tar.bz2
OneConfig-d4bdebd64140649717c1bfbdf882dcc5aeeba066.zip
Optimize workflow
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/checks.yml73
1 files changed, 32 insertions, 41 deletions
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index ca9acff..ed86d21 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -2,7 +2,10 @@
name: Build
-on: [pull_request, workflow_dispatch]
+on:
+ - pull_request
+ - workflow_dispatch
+ - push
concurrency:
group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }}
@@ -15,46 +18,34 @@ jobs:
strategy:
matrix:
version:
- ["1.8.9-forge"]
+ - 1.8.9-forge
- runs-on: "ubuntu-latest"
+ runs-on: ubuntu-latest
steps:
- - name: "Checkout"
- uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: "Gradle Wrapper Validation"
- uses: gradle/wrapper-validation-action@v1
-
- - name: "Setup Java"
- uses: actions/setup-java@v2
- with:
- distribution: "temurin"
- java-version: "17"
-
- - name: "Cache Gradle"
- uses: actions/cache@v2
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-v1-jdk17-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
-
- - name: "Chmod Gradle"
- run: chmod +x ./gradlew
-
-
- - name: "Setup Gradle"
- run: ./gradlew setupGradle
-
-
- - name: "Build"
- run: ./gradlew build
-
- - name: "Upload Build Artifacts"
- uses: actions/upload-artifact@v2
- with:
- name: ${{ matrix.version }} Artifacts
- path: versions/${{ matrix.version }}/build/libs/
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v2
+ with:
+ java-version: 17
+ distribution: temurin
+ cache: gradle
+
+ - name: "Chmod Gradle"
+ run: chmod +x ./gradlew
+
+ - name: "Setup Gradle"
+ run: ./gradlew setupGradle
+
+ - name: "Build"
+ run: ./gradlew build
+
+ - name: "Upload Build Artifacts"
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ matrix.version }} Artifacts
+ path: versions/${{ matrix.version }}/build/libs/