Skip to content

Commit fea4a34

Browse files
committed
Changed versioning scheme and updated build actions
1 parent 3b522f8 commit fea4a34

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
java-version: 21
2626
distribution: temurin
2727

28-
- name: Read version from gradle.properties
28+
- name: Read version from libs.versions.toml
2929
id: version
3030
run: |
31-
VERSION=$(grep "^mod_version" gradle.properties | cut -d '=' -f2 | tr -d ' ')
32-
MC_VERSION=$(grep "^minecraft_version" gradle.properties | cut -d '=' -f2 | tr -d ' ')
33-
TAG_NAME="mc${MC_VERSION}-v${VERSION}"
34-
RELEASE_NAME="${MC_VERSION} build"
31+
VERSION=$(grep "^mod-version" gradle/libs.versions.toml | head -n 1 | cut -d '"' -f2)
32+
MC_VERSION=$(grep "^minecraft.*=.*\"" gradle/libs.versions.toml | head -n 1 | cut -d '"' -f2)
33+
TAG_NAME="${VERSION}+mc${MC_VERSION}"
34+
RELEASE_NAME="v${VERSION} for Minecraft ${MC_VERSION}"
3535
3636
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
3737
echo "mc_version=$MC_VERSION" >> "$GITHUB_OUTPUT"
@@ -69,4 +69,4 @@ jobs:
6969
files: build/libs/*.jar
7070
make_latest: ${{ env.MAKE_LATEST }}
7171
env:
72-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ base {
66
archivesName = properties["archives_base_name"] as String
77
group = properties["maven_group"] as String
88

9-
val modVersion = libs.versions.mod.version.get()
10-
val mcVersion = libs.versions.minecraft.get()
11-
version = "mc$mcVersion-v$modVersion"
9+
version = libs.versions.mod.version.get() + "+mc" + libs.versions.minecraft.get()
1210
}
1311

1412
repositories {

0 commit comments

Comments
 (0)