mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 13:57:59 +01:00
Switch to using reckon and github actions
This commit is contained in:
parent
775b140561
commit
ccb6431db8
7 changed files with 66 additions and 60 deletions
17
.github/workflows/gradle-build.yml
vendored
17
.github/workflows/gradle-build.yml
vendored
|
@ -1,16 +1,19 @@
|
|||
name: Run Gradle on push and pull request
|
||||
on:
|
||||
name: Build on Push
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
jobs:
|
||||
gradle:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
- 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: 16
|
||||
- uses: eskatos/gradle-command-action@v1
|
||||
- name: Build Gradle
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: check
|
||||
|
||||
|
|
19
.github/workflows/gradle-check.yml
vendored
Normal file
19
.github/workflows/gradle-check.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
name: Build on Pull Request
|
||||
on:
|
||||
- pull_request
|
||||
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: 16
|
||||
- name: Build Gradle
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: check
|
24
.github/workflows/gradle-publish.yml
vendored
Normal file
24
.github/workflows/gradle-publish.yml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
name: Publish To Maven
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
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: 16
|
||||
- name: Publish Maven Jar
|
||||
env:
|
||||
ACCESS_KEY: ${{ secrets.ACCESS_KEY }}
|
||||
SECRET_KEY: ${{ secrets.SECRET_KEY }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: build publish
|
17
.travis.yml
17
.travis.yml
|
@ -1,17 +0,0 @@
|
|||
language: java
|
||||
jdk:
|
||||
- openjdk16
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: check
|
||||
script: ./gradlew check
|
||||
- stage: publish
|
||||
script: ./gradlew build publish
|
||||
|
||||
stages:
|
||||
- name: check
|
||||
if: type IN (pull_request)
|
||||
- name: publish
|
||||
if: NOT type IN (pull_request)
|
||||
|
39
build.gradle
39
build.gradle
|
@ -2,6 +2,7 @@ plugins {
|
|||
id 'java-library'
|
||||
id 'fabric-loom' version '0.8-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id 'org.ajoberstar.reckon' version '0.13.0'
|
||||
}
|
||||
|
||||
java {
|
||||
|
@ -10,29 +11,6 @@ java {
|
|||
}
|
||||
}
|
||||
|
||||
def createVersion() {
|
||||
def parts = []
|
||||
|
||||
if (project.release != 'RELEASE') {
|
||||
parts.push project.release
|
||||
}
|
||||
|
||||
def branch = System.env.TRAVIS_BRANCH
|
||||
|
||||
if (branch != null && branch != 'master' && !project.minecraft_version.startsWith(branch)) {
|
||||
parts.push branch
|
||||
}
|
||||
|
||||
parts.push project.minecraft_version
|
||||
|
||||
def ver = project.version
|
||||
if (parts.size > 0) {
|
||||
return ver + '-' + parts.join('-')
|
||||
}
|
||||
return ver
|
||||
}
|
||||
|
||||
version = createVersion()
|
||||
group = project.group
|
||||
description = project.displayname
|
||||
archivesBaseName = project.name
|
||||
|
@ -42,6 +20,11 @@ minecraft {
|
|||
accessWidener 'src/main/resources/minelp.aw'
|
||||
}
|
||||
|
||||
reckon {
|
||||
scopeFromProp()
|
||||
stageFromProp('beta', 'rc', 'final')
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven {
|
||||
|
@ -68,13 +51,13 @@ dependencies {
|
|||
modApi fabricApi.module("fabric-resource-loader-v0", project.fabric_version)
|
||||
modApi fabricApi.module("fabric-networking-v0", project.fabric_version)
|
||||
|
||||
modApi "com.minelittlepony:Kirin:${project.kirin_version}"
|
||||
include "com.minelittlepony:Kirin:${project.kirin_version}"
|
||||
modApi "com.minelittlepony:kirin:${project.kirin_version}"
|
||||
include "com.minelittlepony:kirin:${project.kirin_version}"
|
||||
|
||||
modApi "com.minelittlepony:mson:${project.mson_version}"
|
||||
include "com.minelittlepony:mson:${project.mson_version}"
|
||||
|
||||
modImplementation "com.minelittlepony:HDSkins:${project.hd_skins_version}"
|
||||
modImplementation "com.minelittlepony:hdskins:${project.hd_skins_version}"
|
||||
modCompileOnly("com.terraformersmc:modmenu:${project.modmenu_version}")
|
||||
}
|
||||
|
||||
|
@ -161,9 +144,7 @@ publishing {
|
|||
repositories {
|
||||
maven {
|
||||
name = "MineLittlePony"
|
||||
def mvn = 's3://repo.minelittlepony-mod.com/maven'
|
||||
url = release == 'SNAPSHOT' ? "$mvn/snapshot" : "$mvn/release"
|
||||
|
||||
url = "s3://repo.minelittlepony-mod.com/maven/${version.version.stage.value.name == 'beta' ? 'snapshot' : 'release'}"
|
||||
credentials(AwsCredentials) {
|
||||
accessKey = System.env.ACCESS_KEY
|
||||
secretKey = System.env.SECRET_KEY
|
||||
|
|
|
@ -13,11 +13,9 @@ org.gradle.daemon=false
|
|||
displayname=Mine Little Pony
|
||||
authors=Verdana, Rene_Z, Mumfrey, Killjoy1221, Sollace
|
||||
description=Mine Little Pony turns players and mobs into ponies. Press F9 ingame to access settings.
|
||||
version=4.3.3
|
||||
release=SNAPSHOT
|
||||
|
||||
# Dependencies
|
||||
modmenu_version=2.0.0-beta.7
|
||||
kirin_version=1.8.7-1.17
|
||||
hd_skins_version=6.4.6-1.17-rc1
|
||||
kirin_version=1.9.0-beta.2
|
||||
hd_skins_version=6.4.7-beta.1
|
||||
mson_version=1.4.0-beta.4
|
||||
|
|
|
@ -8,6 +8,4 @@ pluginManagement {
|
|||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
rootProject.name = 'MineLittlePony'
|
||||
//includeBuild '../Kirin'
|
||||
//includeBuild '../HDSkins'
|
||||
rootProject.name = 'minelittlepony'
|
||||
|
|
Loading…
Reference in a new issue