Indium suppor + github runner #7
34
.github/workflows/publish.yml
vendored
Normal file
34
.github/workflows/publish.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Publish mod on Modrinth
|
||||||
|
|
||||||
|
on: [ push, workflow_dispatch ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: validate gradle wrapper
|
||||||
|
uses: https://github.com/gradle/wrapper-validation-action@v1
|
||||||
|
- name: setup jdk
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: 17
|
||||||
|
distribution: 'oracle'
|
||||||
|
- name: make gradle wrapper executable
|
||||||
|
if: ${{ runner.os != 'Windows' }}
|
||||||
|
run: |
|
||||||
|
chmod +x ./gradlew
|
||||||
|
touch local.properties
|
||||||
|
- name: Generate data
|
||||||
|
run: ./gradlew runDatagen
|
||||||
|
- name: Publish Modrinth
|
||||||
|
run: ./gradlew modrinth
|
||||||
|
env:
|
||||||
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
22
build.gradle
22
build.gradle
@ -3,6 +3,7 @@ import fr.altarik.CreateTag
|
|||||||
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
id "com.modrinth.minotaur" version "2.+"
|
||||||
id 'fabric-loom' version '1.5-SNAPSHOT'
|
id 'fabric-loom' version '1.5-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
@ -102,8 +103,8 @@ dependencies {
|
|||||||
// Indium and sodium for sodium support
|
// Indium and sodium for sodium support
|
||||||
modCompileOnly "maven.modrinth:indium:${project.indium_version}+mc${project.minecraft_version}"
|
modCompileOnly "maven.modrinth:indium:${project.indium_version}+mc${project.minecraft_version}"
|
||||||
modCompileOnly "maven.modrinth:sodium:mc${project.minecraft_version}-${project.sodium_version}"
|
modCompileOnly "maven.modrinth:sodium:mc${project.minecraft_version}-${project.sodium_version}"
|
||||||
modRuntimeOnly "maven.modrinth:indium:${project.indium_version}+mc${project.minecraft_version}"
|
// modRuntimeOnly "maven.modrinth:indium:${project.indium_version}+mc${project.minecraft_version}"
|
||||||
modRuntimeOnly "maven.modrinth:sodium:mc${project.minecraft_version}-${project.sodium_version}"
|
// modRuntimeOnly "maven.modrinth:sodium:mc${project.minecraft_version}-${project.sodium_version}"
|
||||||
|
|
||||||
// Athena for connected texture
|
// Athena for connected texture
|
||||||
modCompileOnly "earth.terrarium.athena:athena-fabric-${project.minecraft_version}:${project.athena_version}"
|
modCompileOnly "earth.terrarium.athena:athena-fabric-${project.minecraft_version}:${project.athena_version}"
|
||||||
@ -190,6 +191,23 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// configure modrinth publication
|
||||||
|
modrinth {
|
||||||
|
token = getEnv("MODRINTH_TOKEN", local.getProperty("modrinth_token"))
|
||||||
|
projectId = project.modrinth_id
|
||||||
|
versionNumber = project.mod_version
|
||||||
|
versionName = "${project.archives_base_name} ${project.mod_version}"
|
||||||
|
versionType = project.mod_version.endsWith('SNAPSHOT') ? 'beta' : 'release'
|
||||||
|
uploadFile = remapJar
|
||||||
|
gameVersions = [project.minecraft_version]
|
||||||
|
loaders = ["fabric"]
|
||||||
|
dependencies {
|
||||||
|
required.project "fabric-api"
|
||||||
|
optional.version "b1ZV3DIJ", "${project.athena_version}"
|
||||||
|
optional.version "Orvt0mRa", "${project.indium_version}+mc${project.minecraft_version}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.register("reportToDiscord", ReportDiscord) {
|
tasks.register("reportToDiscord", ReportDiscord) {
|
||||||
config.set(reportConfig)
|
config.set(reportConfig)
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ yarn_mappings=1.20.4+build.3
|
|||||||
loader_version=0.15.6
|
loader_version=0.15.6
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
|
modrinth_id = jCpoCBpn
|
||||||
mod_version = 1.3.1
|
mod_version = 1.3.1
|
||||||
maven_group = fr.adrien1106
|
maven_group = fr.adrien1106
|
||||||
archives_base_name = ReFramed
|
archives_base_name = ReFramed
|
||||||
|
Loading…
Reference in New Issue
Block a user