Skip to content

Commit

Permalink
Fix issues in build script
Browse files Browse the repository at this point in the history
  • Loading branch information
2No2Name committed Jan 23, 2025
1 parent e20ff67 commit 7bdab15
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,36 @@ jobs:
uses: gradle/wrapper-validation-action@v2

- name: make gradle wrapper executable
run: chmod +x ./gradlew
run: chmod +x gradlew

- name: Gradle Release Build
env:
RELEASE_WORKFLOW: true
run: ./gradlew build

- name: Set environment variables
run: |
echo "MINECRAFT_VERSION=$(./gradlew -q printMinecraftVersion)" >> $GITHUB_ENV
echo "MOD_VERSION=$(./gradlew -q printModVersion)" >> $GITHUB_ENV
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: mc${{ env.MINECRAFT_VERSION }}-${{ env.MOD_VERSION }}
release_name: ${{ env.RELEASE_NAME }}
body_path: CHANGELOG.md
draft: false
prerelease: ${{ inputs.releaseType != 'stable' }}

- name: Upload assets to GitHub
uses: AButler/[email protected]
with:
files: 'build/libs/*.jar;!build/libs/*-dev.jar;LICENSE'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-id: ${{ steps.create_release.outputs.id }}

- name: Build & Publish
env:
Expand Down
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Make it possible for users to find out when and why threads have to wait for the other worlds, i.e. what is not implemented in the mod yet
- Find a way to systematically determine whether there are thread-safety issues, including with other mods
- Run some tests to see if there is a performance benefit to using the mod (or is there always a fallback to serial execution in every tick)
- Avoid heavy usage of accesswidener

## Things to check
- Serverlevel.emptyTime is reset by teleports, probably slightly different from vanilla (off by one tick? does it matter -> not really)
Expand Down
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import me.modmuss50.mpp.ReleaseType

plugins {
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'maven-publish'
id "me.modmuss50.mod-publish-plugin" version "0.8.3"
}

version = project.mod_version
Expand Down Expand Up @@ -157,4 +160,16 @@ def getReleaseType() {
}
return ReleaseType.STABLE
}
}

tasks.register("printMinecraftVersion") {
doLast {
println project.minecraft_version
}
}

tasks.register("printModVersion") {
doLast {
println project.mod_version
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ fabric_version=0.114.3+1.21.4
mod_version=2.0.0
maven_group=_2no2name
archives_base_name=Worldthreader
mod_name=Worldthreader


0 comments on commit 7bdab15

Please sign in to comment.