aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/checks.yml
blob: 9ada4ddd577cffd12bb76191a4ebf97c6a76515b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Build Workflow

name: Build

on: [push, pull_request, workflow_dispatch]

concurrency:
  group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }}
  cancel-in-progress: true

jobs:
  build:
    name: "Build"

    strategy:
      matrix:
        version:
          ["1.8.9-forge"]

    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/