-
Notifications
You must be signed in to change notification settings - Fork 28
51 lines (48 loc) · 1.54 KB
/
license.yml
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
# This workflow applies licenses and commits changes
# to the repository.
name: license
on:
push:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [21] # Current Java LTS & minimum supported by Minecraft
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Checking Out the Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validating the Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setting up Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
java-package: jdk
- name: Setting Up the Gradle Wrapper
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Caching Dependencies
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/loom-cache
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-#{{ hashFiles('**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Apply Licenses
run: ./gradlew applyLicenses -PreleaseType=stable -PuseThirdPartyMods=false
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4