Skip to content

Commit

Permalink
Set up publishing to Modrinth
Browse files Browse the repository at this point in the history
  • Loading branch information
Zekiu committed Dec 22, 2023
1 parent bfed4d6 commit c2b9221
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build Wlodzimiers Blocks
on:
- push
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
- name: Fetch Tags
run: git fetch --unshallow --tags -f
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build Gradle
uses: eskatos/gradle-command-action@v1
with:
arguments: check
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish on Modrinth
on:
push:
tags:
- '*'
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
with:
submodules: recursive
- name: Fetch Tags
run: git fetch --unshallow --tags -f
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Publish Modrinth Jar
env:
MODRINTH_KEY: ${{ secrets.MODRINTH_KEY }}
uses: eskatos/gradle-command-action@v1
with:
arguments: modrinth
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'fabric-loom' version '1.4-SNAPSHOT'
id 'maven-publish'
id 'com.modrinth.minotaur' version '2.+'
}

version = project.mod_version + "+" + project.minecraft_version
Expand Down Expand Up @@ -90,3 +91,13 @@ jar {
// // retrieving dependencies.
// }
//}
modrinth {
versionName = "Wlodzimiers Blocks " + project.mod_version + " - " + project.minecraft_version
version = project.mod_version
token = System.getenv("MODRINTH_TOKEN")
projectId = "wlodzimiers-blocks"
uploadFile = remapJar
dependencies {
embedded.project "polymer"
}
}

0 comments on commit c2b9221

Please sign in to comment.