Skip to content

Commit e9a9052

Browse files
committed
Automate Maven deployment
1 parent c31f089 commit e9a9052

File tree

5 files changed

+41
-3
lines changed

5 files changed

+41
-3
lines changed

.github/workflows/publish-maven.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release for 5.x
2+
3+
on:
4+
push:
5+
branches: [ '5.x' ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
release:
10+
name: Publish release JAR for Kotlin for Forge
11+
runs-on: ubuntu-latest
12+
if: "contains(github.event.head_commit.message, '[Maven]') || github.event_name == 'workflow_dispatch'"
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Java
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: 'microsoft'
21+
java-version: '21'
22+
23+
- name: Checkout site branch
24+
uses: actions/checkout@v4
25+
with:
26+
branch: site
27+
path: site
28+
29+
- name: Update repo
30+
run: |
31+
./gradlew publishAllPublicationsToMavenRepository
32+
cd ./site
33+
git config user.name "thedarkcolour"
34+
git config user.email "[email protected]"
35+
git add .
36+
git diff --staged --quiet || (git commit -m "Update repo" && git push)

.github/workflows/publish.yml renamed to .github/workflows/publish-mod.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ name: Release for 5.x
33
on:
44
push:
55
branches: [ '5.x' ]
6+
workflow_dispatch:
67

78
jobs:
89
release:
910
name: Publish release JAR for Kotlin for Forge
1011
runs-on: ubuntu-latest
11-
if: "startsWith(github.event.head_commit.message, '[Release]')"
12+
if: "contains(github.event.head_commit.message, '[Release]') || github.event_name == 'workflow_dispatch'"
1213
steps:
1314
- name: Checkout code
1415
uses: actions/checkout@v4

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ publishing {
330330
}
331331

332332
repositories {
333-
maven("file://${project.projectDir}/repo")
333+
maven("file://${project.projectDir}/site")
334334
}
335335
}
336336

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Kotlin for Forge 5.8.0
22
- Update to Kotlin 2.1.20, coroutines 1.10.2, serialization 1.8.1
33
- Fixed accidental transitive dependency on FancyModLoader
4+
- No more `slim` artifact. If still needed, you can depend on kfflang, kfflib, kffmod separately instead
45

56
## Kotlin for Forge 5.7.0
67
- Updated to Kotlin 2.1.0

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ min_mc_version = 1.20.6
1212
unsupported_mc_version = 1.22
1313

1414
# KOTLIN FOR FORGE VERSION
15-
kff_version=5.7.0
15+
kff_version=5.8.0
1616
kff_max_version=6.0.0

0 commit comments

Comments
 (0)