Skip to content

Commit 46aa0c3

Browse files
feat: updated build system
1 parent c85ba85 commit 46aa0c3

File tree

4 files changed

+21
-37
lines changed

4 files changed

+21
-37
lines changed

.github/workflows/build-release.yml

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,9 @@ on:
77

88
jobs:
99
build:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/cache@v2
13-
with:
14-
path: |
15-
~/.gradle/caches
16-
~/.gradle/wrapper
17-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
18-
restore-keys: |
19-
${{ runner.os }}-gradle-
20-
- uses: actions/checkout@v2
21-
with:
22-
fetch-depth: 30 # Gets the last 30 commits so the changelog might work
23-
- name: Set up JDK
24-
uses: actions/setup-java@v1
25-
with:
26-
java-version: 17
27-
- name: Build & release to curseforge
28-
env:
29-
GIT_COMMIT: ${{ github.event.after }}
30-
GIT_PREVIOUS_COMMIT: ${{ github.event.before }}
31-
NANITE_DEPLOY: ${{ secrets.NANITE_DEPLOY }}
32-
CURSE_DEPLOY: ${{ secrets.CURSE_DEPLOY }}
33-
run: |
34-
chmod +x ./gradlew
35-
./gradlew build publish curseforge --stacktrace --no-daemon
10+
if: |
11+
!contains(github.event.head_commit.message, '[ciskip]')
12+
uses: nanite/workflows/.github/workflows/standard-release.yml@v1
13+
secrets:
14+
nanite-token: ${{ secrets.NANITE_DEPLOY }}
15+
curse-token: ${{ secrets.CURSE_DEPLOY }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## [1902.1.3]
2+
3+
### Changed
4+
5+
- Updated to 1.19.2

build.gradle

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ plugins {
44
id "com.matthewprenger.cursegradle" version "1.4.0"
55
}
66

7-
apply from: 'https://files.latmod.com/public/markdown-git-changelog.gradle'
8-
97
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
108

119
def ENV = System.getenv()
@@ -87,28 +85,29 @@ publishing {
8785
}
8886

8987
repositories {
90-
if (ENV.NANITE_DEPLOY) {
88+
if (ENV.NANITE_TOKEN) {
9189
maven {
92-
url "https://maven.nanite.dev/"
90+
url "https://maven.nanite.dev/releases"
9391
credentials {
9492
username = "nanite"
95-
password = "${ENV.NANITE_DEPLOY}"
93+
password = "${ENV.NANITE_TOKEN}"
9694
}
9795
}
9896
}
9997
}
10098
}
10199

102-
if (ENV.CURSE_DEPLOY) {
100+
if (ENV.CURSE_TOKEN) {
103101
curseforge {
104-
apiKey = ENV.CURSE_DEPLOY
102+
apiKey = ENV.CURSE_TOKEN
105103
project {
106104
id = project.curseforge_id
107105
releaseType = project.curseforge_type
108-
addGameVersion project.minecraft_version
106+
addGameVersion "Forge"
107+
addGameVersion "1.18.2"
109108
mainArtifact(remapJar.archivePath)
110-
changelog = getGitChangelog
109+
changelog = file("./CHANGELOG.md")
111110
changelogType = 'markdown'
112111
}
113112
}
114-
}
113+
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ mod_id=structure-expansion
44
archives_base_name=structure-expansion
55
maven_group=com.sunekaer.mods
66
minecraft_version=1.19.2
7-
mod_version=1902.1.2
7+
mod_version=1902.1.3
88
mod_author=Sunekaer
99
forge_version=43.2.6
1010
curseforge_id=398430

0 commit comments

Comments
 (0)