generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (41 loc) · 1.18 KB
/
publish.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
name: Publish
on:
release:
types:
- published
jobs:
publish:
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
check-latest: true
- name: Cache Gradle configuration
uses: actions/cache@v4
with:
path: |
~/.gradle
.gradle
build
fabric/.gradle
fabric/build
neoforge/.gradle
neoforge/build
key: ${{ runner.os }}-gradle-${{ hashFiles('**/LICENSE') }}
restore-keys: ${{ runner.os }}-gradle
- name: Delete old files
run: rm -rf build/libs fabric/build/libs neoforge/build/libs
- name: Build with Gradle
run: ./gradlew build
- name: Publish to GitHub
uses: AButler/[email protected]
with:
files: "fabric/build/libs/*.jar;neoforge/build/libs/*-all.jar"
repo-token: ${{ secrets.GITHUB_TOKEN }}