Skip to content

Commit

Permalink
sync workflows with vibes (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
auxves authored May 18, 2024
1 parent e44a328 commit 2846128
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 36 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
shell: bash
run: ./gradlew build

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: jar
path: build/libs/*
19 changes: 0 additions & 19 deletions .github/workflows/deploy.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
workflow_dispatch:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
environment: Production

permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
shell: bash
run: ./gradlew build

- uses: Kir-Antipov/[email protected]
with:
modrinth-id: Xv9MHBa1
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

github-token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8
java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21

plugins {
id("fabric-loom")
Expand Down Expand Up @@ -31,7 +31,7 @@ tasks.named<Copy>("processResources") {
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.jvmTarget = "21"
}

tasks.withType<Jar> {
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ org.gradle.jvmargs=-Xmx1G
# Project
version=2.0.8

# Versions (https://modmuss50.me/fabric.html)
minecraft=1.20.1
yarn=1.20.1+build.10
loader=0.14.22
# Versions (https://fabricmc.net/develop)
minecraft=1.20.6
yarn=1.20.6+build.1
loader=0.15.11

fabric_api=0.88.1+1.20.1
fabric_kotlin=1.10.10+kotlin.1.9.10
fabric_api=0.98.0+1.20.6
fabric_kotlin=1.10.20+kotlin.1.9.24
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pluginManagement {
}

plugins {
id("fabric-loom") version "1.3-SNAPSHOT"
kotlin("jvm") version "1.9.10"
id("fabric-loom") version "1.6-SNAPSHOT"
kotlin("jvm") version "1.9.24"
}
}
4 changes: 2 additions & 2 deletions src/main/kotlin/dev/auxves/disco/Disc.kt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package dev.auxves.disco

import net.fabricmc.fabric.api.item.v1.FabricItemSettings
import net.minecraft.item.Item
import net.minecraft.item.ItemStack
import net.minecraft.item.MusicDiscItem
import net.minecraft.sound.SoundEvent
import net.minecraft.text.Text
import net.minecraft.util.Identifier
import net.minecraft.util.Rarity

private val settings = FabricItemSettings()
private val settings = Item.Settings()
.rarity(Rarity.RARE)
.maxCount(1)

Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/dev/auxves/disco/Entrypoint.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import net.minecraft.item.ItemGroups
import net.minecraft.registry.Registries
import net.minecraft.registry.Registry

@Suppress("unused")
fun init() {
val addons = FabricLoader.getInstance().allMods
.filter { it.metadata.customValues.containsKey("disco") }
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"homepage": "https://disco.auxves.dev",
"sources": "https://github.com/auxves/disco"
},
"license": "MIT",
"license": ["GPL-3.0"],
"icon": "assets/disco/icon.png",
"environment": "*",
"entrypoints": {
"main": ["dev.auxves.disco.EntrypointKt::init"]
},
"mixins": [],
"depends": {
"minecraft": "1.20.x",
"minecraft": ">=1.20",
"fabric-api": "*",
"fabric-language-kotlin": "*"
}
Expand Down

0 comments on commit 2846128

Please sign in to comment.