-
Notifications
You must be signed in to change notification settings - Fork 96
31 lines (29 loc) · 924 Bytes
/
publish.yml
File metadata and controls
31 lines (29 loc) · 924 Bytes
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
name: Publish to Modrinth
on:
push:
branches: [ master ]
jobs:
publish:
if: github.repository_owner == 'Elytrium'
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4.2.2
- name: Cache Minecraft reports
uses: actions/cache@v4.1.2
with:
path: plugin/build/minecraft/*/ # Cache only the directories
key: minecraft-${{ hashFiles('gradle.properties') }} # Cache key based on gradle.properties because of gameVersions property
- name: Setup Java
uses: actions/setup-java@v4.5.0
with:
distribution: temurin
java-version: 21
check-latest: true
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3.3.2
- name: Publish
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
run: ./gradlew build modrinth