generated from CleanroomMC/TemplateDevEnv
-
Notifications
You must be signed in to change notification settings - Fork 28
114 lines (103 loc) · 3.86 KB
/
build.yaml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# This workflow must be manually triggered. It accepts a version and a release type.
# First it sets the version in gradle.properties to the new version and pushes it.
# Then it generates a log, based on commits.
# After that builds a jar and uploads it to curseforge/modrinth/GitHub releases
name: Publish mod version
on:
workflow_dispatch:
inputs:
version:
description: 'Mod version'
required: true
release_type:
description: 'Release type'
type: choice
default: 'beta'
options:
- 'release'
- 'beta'
- 'alpha'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Check if tag already exists
run: |
if git rev-parse --verify --quiet "v${{ github.event.inputs.version }}"; then
echo "Version ${{ github.event.inputs.version }} already exists, aborting workflow."
exit 1
fi
- name: Set version
run: sed -i "s/mod_version.*=.*/mod_version = ${{ github.event.inputs.version }}/g" gradle.properties
- name: Commit and push gradle.properties
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Bump version to ${{ github.event.inputs.version }}"
commit_options: "--no-verify"
file_pattern: gradle.properties
tagging_message: "v${{ github.event.inputs.version }}"
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Publish Minecraft Mods
uses: Kir-Antipov/[email protected]
with:
curseforge-id: 687577
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
github-tag: "v${{ github.event.inputs.version }}"
github-generate-changelog: true
github-draft: false
github-prerelease: false
github-token: ${{ secrets.PAT }}
files-primary: build/libs/!(*-@(dev|sources|javadoc)).jar
files-secondary: build/libs/*-@(dev|sources|javadoc).jar
name: GroovyScript-${{ github.event.inputs.version }}
version: ${{ github.event.inputs.version }}
version-type: ${{ github.event.inputs.release_type }}
loaders: |
forge
game-versions: |
1.12.2
dependencies: |
mixin-booter | depends | 8.3
actually-additions | recommends | *
advanced-mortars | recommends | *
applied-energistics-2 | recommends | *
astral-sorcery | recommends | *
avaritia-1-10 | recommends | *
blood-magic | recommends | *
botania | recommends | *
chisel | recommends | *
compact-machines | recommends | *
constructs-armory | recommends | *
draconic-evolution | recommends | *
ender-io | recommends | *
evilcraft | recommends | *
extended-crafting | recommends | *
forestry | recommends | *
had-enough-items | recommends | *
ic2-classic | recommends | *
immersive-engineering | recommends | *
industrial-craft | recommends | *
inspirations | recommends | *
integrated-dynamics | recommends | *
mekanism | recommends | *
roots | recommends | *
thaumcraft | recommends | *
thermal-expansion | recommends | *
tinkers-construct | recommends | *
tinkers-complement | recommends | *
woot | recommends | *
java: |
8
retry-attempts: 2