-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (44 loc) · 1.37 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Publish the mod
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: Generate resources with Gradle
run: ./gradlew runDatagenClient
env:
DISABLE_PROPERTIES_UPDATE: true
- name: Build with Gradle
run: ./gradlew build
env:
DISABLE_PROPERTIES_UPDATE: true
- name: Upload to Modrinth
run: ./gradlew modrinth
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
VERSION_NAME: ${{ github.event.release.name }}
VERSION_IS_PRERELEASE: ${{ github.event.release.prerelease }}
VERSION_CHANGELOG: ${{ github.event.release.body }}
- name: Upload to GitHub
uses: softprops/action-gh-release@v2
with:
files: build/libs/*.jar
- name: Publish to Maven
run: ./gradlew publishMavenPublicationToOffsetMonkey538Repository
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}