mirror of
https://github.com/ashhhleyyy/player-pronouns.git
synced 2024-11-23 17:48:09 +00:00
feat(ci): Automatic modrinth publishing
This commit is contained in:
parent
e199a90f3b
commit
5ceab2d741
2 changed files with 49 additions and 0 deletions
40
.github/workflows/release.yml
vendored
Normal file
40
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
name: Fabric Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/loom-cache
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
|
restore-keys: |
|
||||||
|
gradle-
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 17
|
||||||
|
|
||||||
|
- name: Grant execute permission for gradlew
|
||||||
|
run: chmod +x gradlew
|
||||||
|
|
||||||
|
- name: Build and publish with Gradle
|
||||||
|
run: ./gradlew modrinth
|
||||||
|
env:
|
||||||
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||||
|
|
||||||
|
- name: Upload GitHub release
|
||||||
|
uses: AButler/upload-release-assets@v2.0
|
||||||
|
with:
|
||||||
|
files: 'build/libs/player-pronouns-*.jar'
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -1,6 +1,7 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("fabric-loom") version "0.12.+"
|
id("fabric-loom") version "0.12.+"
|
||||||
id("io.github.juuxel.loom-quiltflower") version "1.7.+"
|
id("io.github.juuxel.loom-quiltflower") version "1.7.+"
|
||||||
|
id("com.modrinth.minotaur") version "2.+"
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,3 +72,11 @@ tasks.jar {
|
||||||
rename { "${it}_${project.name}" }
|
rename { "${it}_${project.name}" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
modrinth {
|
||||||
|
projectId.set("player-pronouns")
|
||||||
|
uploadFile.set(tasks.remapJar.get())
|
||||||
|
dependencies {
|
||||||
|
required.project("fabric-api")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue