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