Skip to content

Commit

Permalink
v1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
LasmGratel committed Sep 19, 2024
1 parent 1d52030 commit cee1e61
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 93 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/publish_project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Publishes the project to GitHub Releases, CurseForge, and Modrinth
name: Publish Project

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # any SemVer tag, e.g. v1.2.3

env:
# link to the changelog with a format code for the version
CHANGELOG_LOCATION: "Changelog is available [here](https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }})"
# type of release
RELEASE_TYPE: "beta"

concurrency:
group: publish-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
publish:
name: Publish
runs-on: ubuntu-latest

permissions:
contents: write # needed to create GitHub releases

steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Build Project
run: ./gradlew build --warning-mode all --build-cache

- name: Publish to GitHub
uses: softprops/action-gh-release@v2
with:
files: |
"forge/build/libs/betterp2p-${{ steps.build.outputs.version }}-forge.jar"
"fabric/build/libs/betterp2p-${{ steps.build.outputs.version }}-fabric.jar"
generate_release_notes: true
fail_on_unmatched_files: true

- name: "Upload Forge to CurseForge"
uses: itsmeow/curseforge-upload@v3
with:
file_path: "forge/build/libs/betterp2p-${{ steps.build.outputs.version }}-forge.jar"
game_endpoint: "minecraft"
relations: "applied-energistics-2:requiredDependency,architectury-api:requiredDependency,kotlin-for-forge:requiredDependency"
game_versions: "Minecraft 1.20.1,Java 17,Forge"
project_id: "538092"
token: "${{ secrets.CF_API_TOKEN }}"

- name: "Upload Fabric to CurseForge"
uses: itsmeow/curseforge-upload@v3
with:
file_path: "fabric/build/libs/betterp2p-${{ steps.build.outputs.version }}-fabric.jar"
game_endpoint: "minecraft"
relations: "fabric-api:requiredDependency,applied-energistics-2:requiredDependency,fabric-language-kotlin:requiredDependency,architectury-api:requiredDependency"
game_versions: "Minecraft 1.20.1,Java 17,Fabric"
project_id: "538092"
token: "${{ secrets.CF_API_TOKEN }}"

- name: "Upload Forge to Modrinth"
uses: dsx137/modrinth-release-action@main
env:
MODRINTH_TOKEN: "${{ secrets.MODRINTH_TOKEN }}"
with:
name: "[Forge 1.20.1] v${{ steps.build.outputs.version }}"
project_id: 9DDxOvTJ
loaders: forge
game_versions: 1.20.1
version_number: "${{ steps.build.outputs.version }}"
files: |
"forge/build/libs/betterp2p-${{ steps.build.outputs.version }}-forge.jar"
dependencies: lhGA9TYQ:required, ordsPcFz:required, XxWD5pD3:required
version_type: release

- name: "Upload Fabric to Modrinth"
uses: dsx137/modrinth-release-action@main
env:
MODRINTH_TOKEN: "${{ secrets.MODRINTH_TOKEN }}"
with:
name: "[Fabric 1.20.1] v${{ steps.build.outputs.version }}"
project_id: 9DDxOvTJ
loaders: fabric
game_versions: 1.20.1
version_number: "${{ steps.build.outputs.version }}"
files: |
"fabric/build/libs/betterp2p-${{ steps.build.outputs.version }}-fabric.jar"
dependencies: P7dR8mSH:required, XxWD5pD3:required, Ha28R6CL:required, lhGA9TYQ:required
version_type: release
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.4.3] - 2024-09-19

### Fixed

- Rare issue that crashes client when drawing outline (#19)

## [1.4.2] - 2024-07-23

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import dev.lasm.betterp2p.client.ClientCache.positions
import dev.lasm.betterp2p.client.ClientCache.selectedFacing
import dev.lasm.betterp2p.client.ClientCache.selectedPosition
import dev.lasm.betterp2p.item.ItemAdvancedMemoryCard
import java.util.*
import net.minecraft.client.Camera
import net.minecraft.client.renderer.MultiBufferSource
import net.minecraft.client.renderer.RenderStateShard
Expand All @@ -19,6 +18,7 @@ import net.minecraft.world.entity.player.Player
import net.minecraft.world.phys.AABB
import net.minecraft.world.phys.shapes.Shapes
import org.lwjgl.opengl.GL11
import java.util.*

object RenderBlockOutline {
@JvmStatic
Expand Down Expand Up @@ -72,7 +72,7 @@ object RenderBlockOutline {
// 0x45DA75
}
// 0x66CCFF
for (entry in positions) {
for (entry in positions.toList()) {
val side = entry.component2()
val boxes = ArrayList<AABB>()
val bch = BusCollisionHelper(boxes, side, true)
Expand Down
46 changes: 0 additions & 46 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import net.darkhax.curseforgegradle.TaskPublishCurseForge

plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
id "com.modrinth.minotaur" version "2.+"
id 'net.darkhax.curseforgegradle' version '1.1.+'
}

architectury {
Expand Down Expand Up @@ -80,45 +76,3 @@ publishing {
// Add repositories to publish to here.
}
}

modrinth {
token = findProperty("modrinth_token") // Remember to have the MODRINTH_TOKEN environment variable set or else this will fail - just make sure it stays private!
projectId = "betterp2p" // This can be the project ID or the slug. Either will work!
versionName = "[Fabric 1.20.1] v${project.mod_version}"
uploadFile = remapJar // With Loom, this MUST be set to `remapJar` instead of `jar`!
gameVersions = ['1.20.1'] // Must be an array, even with only one version
loaders = ["fabric"] // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
syncBodyFrom = rootProject.file("README.md").text
changelog = rootProject.file("CHANGELOG.md").text
dependencies { // A special DSL for creating dependencies
// scope.type
// The scope can be `required`, `optional`, `incompatible`, or `embedded`
// The type can either be `project` or `version`
required.project "fabric-api"
required.project "architectury-api"
required.project "ae2"
required.project "fabric-language-kotlin"
}
}

// CurseForgeGradle
tasks.register('publishCurseforgeFabric', TaskPublishCurseForge) {

apiToken = findProperty('curseforge_token')
debugMode = false

// The main file to upload
def mainFile = upload(538092, remapJar)
mainFile.releaseType = 'release'
mainFile.changelog = rootProject.file('CHANGELOG.md')
mainFile.changelogType = 'markdown'
mainFile.addModLoader("Fabric")
mainFile.displayName = "[Fabric 1.20.1] v${project.mod_version}"
mainFile.addGameVersion('1.20.1')
mainFile.addRequirement('fabric-api')
mainFile.addRequirement('architectury-api')
mainFile.addRequirement('applied-energistics-2')
mainFile.addRequirement('fabric-language-kotlin')
}

tasks.modrinth.dependsOn(tasks.modrinthSyncBody)
44 changes: 0 additions & 44 deletions forge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import net.darkhax.curseforgegradle.TaskPublishCurseForge

plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
id "com.modrinth.minotaur" version "2.+"
id 'net.darkhax.curseforgegradle' version '1.1.+'
}

architectury {
Expand Down Expand Up @@ -95,43 +91,3 @@ publishing {
// Add repositories to publish to here.
}
}

modrinth {
token = findProperty("modrinth_token") // Remember to have the MODRINTH_TOKEN environment variable set or else this will fail - just make sure it stays private!
projectId = "betterp2p" // This can be the project ID or the slug. Either will work!
versionName = "[Forge 1.20.1] v${project.mod_version}"
uploadFile = remapJar // With Loom, this MUST be set to `remapJar` instead of `jar`!
gameVersions = ['1.20.1'] // Must be an array, even with only one version
loaders = ["forge"] // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
syncBodyFrom = rootProject.file("README.md").text
changelog = rootProject.file("CHANGELOG.md").text
dependencies { // A special DSL for creating dependencies
// scope.type
// The scope can be `required`, `optional`, `incompatible`, or `embedded`
// The type can either be `project` or `version`
required.project "architectury-api"
required.project "ae2"
required.project "kotlin-for-forge"
}
}

// CurseForgeGradle
tasks.register('publishCurseforgeForge', TaskPublishCurseForge) {

apiToken = findProperty('curseforge_token')
debugMode = false

// The main file to upload
def mainFile = upload(538092, remapJar)
mainFile.releaseType = 'release'
mainFile.changelog = rootProject.file('CHANGELOG.md')
mainFile.changelogType = 'markdown'
mainFile.addModLoader("Forge")
mainFile.displayName = "[Forge 1.20.1] v${project.mod_version}"
mainFile.addGameVersion('1.20.1')
mainFile.addRequirement('architectury-api')
mainFile.addRequirement('applied-energistics-2')
mainFile.addRequirement('kotlin-for-forge')
}

tasks.modrinth.dependsOn(tasks.modrinthSyncBody)
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ minecraft_version=1.20.1
enabled_platforms=fabric,forge

archives_base_name=betterp2p
mod_version=1.4.2
mod_version=1.4.3
maven_group=dev.lasm.betterp2p

architectury_version=9.1.12
Expand Down

0 comments on commit cee1e61

Please sign in to comment.