Skip to content

Commit

Permalink
feat: updated build system
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHillcox committed Feb 25, 2023
1 parent c85ba85 commit 46aa0c3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 37 deletions.
32 changes: 6 additions & 26 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,9 @@ on:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/checkout@v2
with:
fetch-depth: 30 # Gets the last 30 commits so the changelog might work
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build & release to curseforge
env:
GIT_COMMIT: ${{ github.event.after }}
GIT_PREVIOUS_COMMIT: ${{ github.event.before }}
NANITE_DEPLOY: ${{ secrets.NANITE_DEPLOY }}
CURSE_DEPLOY: ${{ secrets.CURSE_DEPLOY }}
run: |
chmod +x ./gradlew
./gradlew build publish curseforge --stacktrace --no-daemon
if: |
!contains(github.event.head_commit.message, '[ciskip]')
uses: nanite/workflows/.github/workflows/standard-release.yml@v1
secrets:
nanite-token: ${{ secrets.NANITE_DEPLOY }}
curse-token: ${{ secrets.CURSE_DEPLOY }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## [1902.1.3]

### Changed

- Updated to 1.19.2
19 changes: 9 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ plugins {
id "com.matthewprenger.cursegradle" version "1.4.0"
}

apply from: 'https://files.latmod.com/public/markdown-git-changelog.gradle'

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17

def ENV = System.getenv()
Expand Down Expand Up @@ -87,28 +85,29 @@ publishing {
}

repositories {
if (ENV.NANITE_DEPLOY) {
if (ENV.NANITE_TOKEN) {
maven {
url "https://maven.nanite.dev/"
url "https://maven.nanite.dev/releases"
credentials {
username = "nanite"
password = "${ENV.NANITE_DEPLOY}"
password = "${ENV.NANITE_TOKEN}"
}
}
}
}
}

if (ENV.CURSE_DEPLOY) {
if (ENV.CURSE_TOKEN) {
curseforge {
apiKey = ENV.CURSE_DEPLOY
apiKey = ENV.CURSE_TOKEN
project {
id = project.curseforge_id
releaseType = project.curseforge_type
addGameVersion project.minecraft_version
addGameVersion "Forge"
addGameVersion "1.18.2"
mainArtifact(remapJar.archivePath)
changelog = getGitChangelog
changelog = file("./CHANGELOG.md")
changelogType = 'markdown'
}
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod_id=structure-expansion
archives_base_name=structure-expansion
maven_group=com.sunekaer.mods
minecraft_version=1.19.2
mod_version=1902.1.2
mod_version=1902.1.3
mod_author=Sunekaer
forge_version=43.2.6
curseforge_id=398430
Expand Down

0 comments on commit 46aa0c3

Please sign in to comment.