-
Notifications
You must be signed in to change notification settings - Fork 4
74 lines (69 loc) · 2.3 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Publish Release to CurseForge Modrinth
on : [workflow_dispatch]
env:
## set env
git_sha: ${{github.sha}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get branch names
id: branch-names
uses: tj-actions/branch-names@v8
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
src/generated
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-${{steps.branch-names.outputs.current_branch}}
- uses: actions/checkout@v4
- uses: BrycensRanch/read-properties-action@v1
id: version
with:
file: gradle.properties
property: mod_version
default: 1.0.0
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'adopt'
- name: Set version env
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Datagen with gradle
run: ./gradlew runData
- name: Clean Build
run: ./gradlew clean build
- name: Publish CurseForge
uses: Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: 1214985
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
modrinth-id: HToE46NN
modrinth-featured: true
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
loaders: |
neoforge
game-versions: |
[1.21.1,)
java: |
21
files: |
build/libs/wild_wind-${{steps.version.outputs.value}}.jar
name: Wild-Wind ${{steps.version.outputs.value}} for Minecraft 1.21.X
version: ${{steps.version.outputs.value}}
version-type: release
changelog-file: CHANGELOG.*
game-version-filter: none
dependencies: |
retry-attempts: 2
retry-delay: 10000
fail-mode: fail