mirror of
https://github.com/TibiNonEst/cauldron-dyeing.git
synced 2024-11-24 03:27:19 -05:00
Publishing is easier in the actions
This commit is contained in:
parent
991594e20e
commit
a966b104f1
4 changed files with 21 additions and 41 deletions
1
.github/workflows/build-gradle.yml
vendored
1
.github/workflows/build-gradle.yml
vendored
|
@ -20,6 +20,7 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
.gradle
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
|
|
24
.github/workflows/build-release.yml
vendored
24
.github/workflows/build-release.yml
vendored
|
@ -23,6 +23,7 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
.gradle
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
|
@ -32,16 +33,25 @@ jobs:
|
|||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Build and publish with Gradle
|
||||
run: ./gradlew build modrinth curseforge
|
||||
run: ./gradlew build publish
|
||||
env:
|
||||
MAVEN_URL: ${{ secrets.MAVEN_URL }}
|
||||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: AButler/upload-release-assets@v2.0
|
||||
- name: Upload artifacts to Modrinth, Curseforge and GitHub
|
||||
uses: Kir-Antipov/mc-publish@v3.1
|
||||
with:
|
||||
files: 'build/libs/!(*-sources).jar'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
modrinth-id: 5AgJnN8I
|
||||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
|
||||
|
||||
curseforge-id: 564870
|
||||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
|
||||
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
files: build/libs/!(*-sources).jar
|
||||
|
||||
loaders: |
|
||||
fabric
|
||||
quilt
|
||||
|
|
35
build.gradle
35
build.gradle
|
@ -3,8 +3,6 @@ plugins {
|
|||
alias(libs.plugins.loom.quiltflower)
|
||||
alias(libs.plugins.qmol)
|
||||
alias(libs.plugins.grgit)
|
||||
alias(libs.plugins.minotaur)
|
||||
alias(libs.plugins.cursegradle)
|
||||
id "maven-publish"
|
||||
}
|
||||
|
||||
|
@ -66,33 +64,6 @@ jar {
|
|||
}
|
||||
}
|
||||
|
||||
modrinth {
|
||||
projectId = "5AgJnN8I"
|
||||
uploadFile = remapJar
|
||||
}
|
||||
tasks.modrinth.dependsOn remapJar
|
||||
|
||||
def ENV = System.getenv()
|
||||
curseforge {
|
||||
if (ENV.CURSEFORGE_TOKEN) {
|
||||
apiKey = ENV.CURSEFORGE_TOKEN
|
||||
}
|
||||
|
||||
project {
|
||||
id = "564870"
|
||||
changelog = "No changelog provided"
|
||||
releaseType = "release"
|
||||
addGameVersion libs.versions.minecraft.get()
|
||||
addGameVersion "Fabric"
|
||||
addGameVersion "Quilt"
|
||||
|
||||
mainArtifact(jar) {
|
||||
displayName = "Cauldron Dyeing ${project.mod_version}"
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.curseforge.dependsOn remapJar
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
|
@ -102,10 +73,10 @@ publishing {
|
|||
|
||||
repositories {
|
||||
maven {
|
||||
url = ENV.MAVEN_URL
|
||||
url = System.getenv("MAVEN_URL")
|
||||
credentials {
|
||||
username = ENV.MAVEN_USERNAME
|
||||
password = ENV.MAVEN_PASSWORD
|
||||
username = System.getenv("MAVEN_USERNAME")
|
||||
password = System.getenv("MAVEN_PASSWORD")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,5 +19,3 @@ fabric_loom = { id = "fabric-loom", version = "0.12.+" }
|
|||
loom_quiltflower = { id = "io.github.juuxel.loom-quiltflower", version = "1.7.+" }
|
||||
qmol = { id = "org.quiltmc.quilt-mappings-on-loom", version = "4.2.0" }
|
||||
grgit = { id = "org.ajoberstar.grgit", version = "5.+" }
|
||||
minotaur = { id = "com.modrinth.minotaur", version = "2.+" }
|
||||
cursegradle = { id = "com.matthewprenger.cursegradle", version = "1.+" }
|
||||
|
|
Loading…
Reference in a new issue