-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.46 KB
/
gradle.yml
File metadata and controls
41 lines (39 loc) · 1.46 KB
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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-20.04
outputs:
mc-version: ${{ steps.gradle.output.mc-version }}
distributor-version: ${{ steps.gradle.output.distributor-version }}
forge-version: ${{ steps.gradle.output.forge-version }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Cache .gradle/caches
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Cache .gradle/wrapper
uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-wrapper-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Gradle build
id: gradle
run: ./gradlew setupActionsOutputs clean build
- uses: actions/upload-artifact@v2
with:
name: ${{ steps.gradle.outputs.distributor-version }}
path: build/libs/distributor*.jar
retention-days: 7