Skip to content

Commit eface14

Browse files
authored
Fix #68, #69. Pre-setup auto releasing (#72)
* Fix #68, #69. Pre-setup auto releasing
1 parent f8fe161 commit eface14

File tree

7 files changed

+126
-30
lines changed

7 files changed

+126
-30
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/cache@v2
14+
with:
15+
path: |
16+
~/.gradle/loom-cache
17+
~/.gradle/caches
18+
~/.gradle/wrapper
19+
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
20+
restore-keys: |
21+
gradle-
22+
- uses: actions/checkout@v2
23+
- name: Set up JDK
24+
uses: actions/setup-java@v1
25+
with:
26+
java-version: 17
27+
28+
- name: Grant execute permission for gradlew
29+
run: chmod +x gradlew
30+
31+
- name: Build and publish with Gradle
32+
run: ./gradlew build publish
33+
env:
34+
CURSEFORGE: ${{ secrets.CURSEFORGE }}
35+
MODRINTH: ${{ secrets.MODRINTH }}
36+
CHANGELOG: ${{ github.event.release.body }}
37+
- name: Upload GitHub release
38+
uses: AButler/upload-release-assets@v2.0
39+
with:
40+
files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar'
41+
repo-token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,27 @@ CC: R tries to maintain parity with CC: T, but may be behind or divergent in som
1313
## Resource Packs
1414
This mod includes textures by [Jummit](https://github.com/Jummit) that are more in line with the style of Mojang's new texture-artist, Jappa. If you prefer the original textures, enable the "Classic" resource pack.
1515

16-
<img src="https://raw.githubusercontent.com/3prm3/cc-pack/main/pack.png" alt="CC: Restitched" width="16" height="16"/> We also have a second resourcepack made by [3prm3](https://github.com/3prm3), it features a complete overhaul and can be enabled by enabling the `overhaul` resource pack, go check out his resource pack over [here](https://github.com/3prm3/cc-pack/)!
16+
<img src="https://raw.githubusercontent.com/cc-orgs/cc-overhaul/main/pack.png" alt="CC: Restitched" width="32" height="32"/> We also have a second resourcepack made by [3prm3](https://github.com/3prm3), it features a complete overhaul and can be enabled by enabling the `overhaul` resource pack, go check out his resource pack over [here](https://github.com/cc-orgs/cc-overhaul/tree/main)!
1717

18-
## Contributing
18+
## Bleeding Edge Ver.
19+
Bleeding edge builds can be found [here](https://github.com/cc-tweaked/cc-restitched/actions) at Github Actions. In the .zip file there should be a "-dev" jar, a "-javadoc" jar, a "-sources-dev" jar, a "-sources" jar, and a plain (jar without an affixed tag) jar. Put the plain jar in the mods folder.
20+
21+
## Contributions
1922
Any contribution is welcome, be that using the mod, reporting bugs or contributing code. In order to start helping develop CC: R there are a few rules;
20-
1) Make sure your code follows the checkstyle rules. You can test this by running `./gradle build` or `./gradle check`.
21-
2) Do not alter the lua code unless those changes are taken directly from CC: Tweaked. If you wish to contribute changes to the in game rom please contribute upstream at [CC-Tweaked](https://github.com/SquidDev-CC/CC-Tweaked).
23+
1) Follow the [Fabric](https://fabricmc.net/) programming guidelines as close as possible. This means you have to use [`loom`](https://fabricmc.net/wiki/tutorial:mappings) mappings, if you use anything else, your code will be rejected.
24+
2) Make sure your code follows the checkstyle rules. You can test this by running `./gradle build` or `./gradle check`.
25+
3) Do not alter the lua code unless those changes are taken directly from CC: Tweaked. If you wish to contribute changes to the in game rom please contribute upstream at [CC-Tweaked](https://github.com/SquidDev-CC/CC-Tweaked).
26+
4) You cannot intentionally implement bugs and security vulnerabilities.
27+
5) Unless the code is taken directly from CC: Tweaked, `lua` code is offlimits from alteration.
2228

23-
# Does this work Fabric's many rendering mods?
29+
# Rendering Mod Compatability
2430
* [ YES ] Sodium
2531
* [ YES ] Optifine
2632
* Works with VBO Rendering (automatically set)
2733
* No issues
28-
* [ EHH ] Iris Shaders
34+
* [ OK ] Iris Shaders
2935
* "Works" with TBO Rendering (Default)
30-
* Crashes with VBO Rendering
31-
* <details>
32-
<summary>Shaders are broken</summary>
33-
34-
* Shaders will cause varrying results ranging from monitors being invisible, to straight up crashing.
35-
* Not using shaders will result in odd Z-Fighting of the monitor display and the transparent texture
36-
- ![](https://user-images.githubusercontent.com/10422110/136869483-91824c5f-841f-4316-bfb1-2412477a29ee.png)
37-
- ![](https://user-images.githubusercontent.com/10422110/136869535-a16581a3-5e0a-4632-923f-c8de8cc8a6ea.png)
38-
</details>
36+
* Works with VBO Rendering
3937
* [ YES ] Canvas
4038
* Works with TBO Rendering (Default)
4139
* Scuffed with VBO Rendering
@@ -50,17 +48,8 @@ Any contribution is welcome, be that using the mod, reporting bugs or contributi
5048
- ![](https://i.imgur.com/OEmZXsx.png)
5149
</details>
5250

53-
## Contributing
54-
Any contribution is welcome, be that using the mod, reporting bugs or contributing code. In order to start helping develop CC: R there are a few rules;
55-
1) Follow the [Fabric](https://fabricmc.net/) programming guidelines as close as possible. This means you have to use [`loom`](https://fabricmc.net/wiki/tutorial:mappings) mappings, if you use anything else, your code will be rejected.
56-
2) You cannot intentionally implement bugs and security vulnerabilities.
57-
3) Unless the code is taken directly from CC: Tweaked, `lua` code is offlimits from alteration.
58-
59-
## Bleeding Edge Builds
60-
Bleeding edge builds can be found [here](https://github.com/cc-tweaked/cc-restitched/actions) at Github Actions.
61-
6251
## Community
6352
If you need help getting started with CC: Restitched, want to show off your latest project, or just want to chat about ComputerCraft, here is the [Forum](https://forums.computercraft.cc/) and the [Discord](https://discord.gg/H2UyJXe).
6453

65-
## Perpheral mods
54+
## Perpheral Mods
6655
Unfortunately, CC: Restitched does not have as many peripherals mods available as CC: Tweaked. If you're an interested mod developer, please check out our `api` package. If you've already made a mod with CC: R peripheral support OR if you're a player who found a mod with ComputerCraft integration, please open an [issue here](https://github.com/cc-tweaked/cc-restitched/issues/new?assignees=&labels=peripheralShoutout&template=peripheral_shoutout.md) to let us know and we'll add it to the list!

build.gradle

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ plugins {
55
id "com.github.hierynomus.license" version "0.16.1"
66
id "org.jetbrains.kotlin.jvm" version "1.5.21"
77
id 'fabric-loom' version '0.10-SNAPSHOT'
8+
id "com.modrinth.minotaur" version "2.+"
9+
id 'com.matthewprenger.cursegradle' version '1.4.0'
810
}
911

1012
def javaVersion = JavaLanguageVersion.of(17)
@@ -247,3 +249,49 @@ publishing {
247249
// mavenLocal()
248250
}
249251
}
252+
253+
if (System.getenv("MODRINTH")) {
254+
modrinth {
255+
token = System.getenv("MODRINTH")
256+
257+
projectId = "eldBwa5V"
258+
versionNumber = version
259+
versionType = "release"
260+
uploadFile = remapJar
261+
gameVersions = [((String) project.mc_version)]
262+
loaders = ["fabric"]
263+
changelog = System.getenv("CHANGELOG")
264+
}
265+
266+
remapJar {
267+
finalizedBy project.tasks.modrinth
268+
}
269+
}
270+
271+
if (System.getenv("CURSEFORGE")) {
272+
curseforge {
273+
apiKey = System.getenv("CURSEFORGE")
274+
275+
project {
276+
id = "462672"
277+
releaseType = "release"
278+
changelog = System.getenv("CHANGELOG")
279+
changelogType = "markdown"
280+
addGameVersion ((String) project.mc_version)
281+
addGameVersion "Fabric"
282+
mainArtifact(remapJar)
283+
284+
afterEvaluate {
285+
uploadTask.dependsOn("remapJar")
286+
}
287+
}
288+
289+
options {
290+
forgeGradleIntegration = false
291+
}
292+
}
293+
294+
remapJar {
295+
finalizedBy project.tasks.curseforge
296+
}
297+
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
org.gradle.jvmargs=-Xmx3G
33

44
# Mod properties
5-
mod_version=1.100.3
5+
mod_version=1.100.4
66

77
# Minecraft properties
88
mc_version=1.18.2

src/main/java/dan200/computercraft/fabric/mixin/MixinLanguage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import net.fabricmc.loader.api.ModContainer;
1616
import com.google.common.collect.ImmutableMap;
1717
import com.google.gson.JsonParseException;
18-
import org.apache.logging.log4j.Logger;
1918
import org.jetbrains.annotations.NotNull;
19+
import org.slf4j.Logger;
2020
import org.spongepowered.asm.mixin.Final;
2121
import org.spongepowered.asm.mixin.Mixin;
2222
import org.spongepowered.asm.mixin.Shadow;

src/main/java/dan200/computercraft/shared/Registry.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
import net.minecraft.world.item.*;
6363
import net.minecraft.world.level.block.Block;
6464
import net.minecraft.world.level.block.Blocks;
65-
import net.minecraft.world.level.block.SoundType;
6665
import net.minecraft.world.level.block.entity.BlockEntity;
6766
import net.minecraft.world.level.block.entity.BlockEntityType;
6867
import net.minecraft.world.level.block.state.BlockBehaviour;
@@ -148,12 +147,12 @@ public static <T extends Block> T register( String id, T value )
148147

149148
private static BlockBehaviour.Properties properties()
150149
{
151-
return BlockBehaviour.Properties.of( Material.GLASS ).strength( 2F ).sound( SoundType.STONE ).noOcclusion();
150+
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2F ).noOcclusion();
152151
}
153152

154153
private static BlockBehaviour.Properties turtleProperties()
155154
{
156-
return FabricBlockSettings.copyOf( Blocks.STONE ).strength( 2.5f );
155+
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2.5f );
157156
}
158157

159158
private static BlockBehaviour.Properties modemProperties()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"replace": false,
3+
"values": [
4+
"computercraft:monitor_normal",
5+
"computercraft:monitor_advanced",
6+
"computercraft:computer_normal",
7+
"computercraft:computer_advanced",
8+
"computercraft:computer_command",
9+
"computercraft:turtle_normal",
10+
"computercraft:turtle_advanced",
11+
"computercraft:speaker",
12+
"computercraft:disk_drive",
13+
"computercraft:printer",
14+
"computercraft:wireless_modem_normal",
15+
"computercraft:wireless_modem_advanced",
16+
"computercraft:wired_modem_full",
17+
"computercraft:cable"
18+
]
19+
}

0 commit comments

Comments
 (0)