Added curseforge task
This commit is contained in:
@@ -2,7 +2,7 @@ name: 'Release'
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [created]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -36,13 +36,28 @@ jobs:
|
|||||||
run: ./gradlew runData --no-daemon
|
run: ./gradlew runData --no-daemon
|
||||||
- name: Validate assets
|
- name: Validate assets
|
||||||
run: test -d ./src/generated
|
run: test -d ./src/generated
|
||||||
- name: Build, sign, and publish with Gradle
|
- name: Build with Gradle
|
||||||
env:
|
env:
|
||||||
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
|
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
|
||||||
KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }}
|
KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }}
|
||||||
KEY_STORE_KEY_PASS: ${{ secrets.KEY_STORE_KEY_PASS }}
|
KEY_STORE_KEY_PASS: ${{ secrets.KEY_STORE_KEY_PASS }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew build publish --no-daemon
|
run: ./gradlew build --no-daemon
|
||||||
|
- name: Upload to curseforge
|
||||||
|
env:
|
||||||
|
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
|
||||||
|
KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }}
|
||||||
|
KEY_STORE_KEY_PASS: ${{ secrets.KEY_STORE_KEY_PASS }}
|
||||||
|
CHANGELOG: ${{ github.event.release.body }}
|
||||||
|
CURSEFORGE: ${{ secrets.CURSEFORGE }}
|
||||||
|
run: ./gradlew curseforge --no-daemon
|
||||||
|
- name: Publish to github packages
|
||||||
|
env:
|
||||||
|
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
|
||||||
|
KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }}
|
||||||
|
KEY_STORE_KEY_PASS: ${{ secrets.KEY_STORE_KEY_PASS }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: ./gradlew publish --no-daemon
|
||||||
- name: Prepare artifact metadata
|
- name: Prepare artifact metadata
|
||||||
id: prepare_artifact_metadata
|
id: prepare_artifact_metadata
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ buildscript {
|
|||||||
plugins {
|
plugins {
|
||||||
id "maven-publish"
|
id "maven-publish"
|
||||||
id "com.diffplug.gradle.spotless" version "4.3.0"
|
id "com.diffplug.gradle.spotless" version "4.3.0"
|
||||||
|
id "com.matthewprenger.cursegradle" version "1.4.0"
|
||||||
id "org.sonarqube" version "2.8"
|
id "org.sonarqube" version "2.8"
|
||||||
id "jacoco"
|
id "jacoco"
|
||||||
}
|
}
|
||||||
@@ -165,6 +166,7 @@ task signJar(type: net.minecraftforge.gradle.common.task.SignJar, dependsOn: 're
|
|||||||
}
|
}
|
||||||
|
|
||||||
apply from: 'gradle/scripts/artifacts.gradle'
|
apply from: 'gradle/scripts/artifacts.gradle'
|
||||||
|
apply from: 'gradle/scripts/curseforge.gradle'
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ ctm_version=MC1.15.2-1.1.0.9
|
|||||||
#########################################################
|
#########################################################
|
||||||
website_version=1.15.2
|
website_version=1.15.2
|
||||||
curse_versions=1.15.2
|
curse_versions=1.15.2
|
||||||
|
curseforge_project=223794
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# Gradle #
|
# Gradle #
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2020, TeamAppliedEnergistics, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
*g GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
def isAlpha = project.version.contains("alpha")
|
||||||
|
def isBeta = project.version.contains("beta")
|
||||||
|
|
||||||
|
def cfReleaseType = "release"
|
||||||
|
if (isAlpha) {
|
||||||
|
cfReleaseType = "alpha"
|
||||||
|
} else if (isBeta) {
|
||||||
|
cfReleaseType = "beta"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (System.getenv("CURSEFORGE")) {
|
||||||
|
curseforge {
|
||||||
|
apiKey = System.getenv("CURSEFORGE")
|
||||||
|
project {
|
||||||
|
id = project.curseforge_project
|
||||||
|
changelogType = "markdown"
|
||||||
|
changelog = System.getenv("CHANGELOG") ?: "Please visit our [releases](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases) for a changelog"
|
||||||
|
releaseType = cfReleaseType
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user