-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bab9742
commit b63d8e6
Showing
6 changed files
with
263 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Java CI with Gradle | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 16 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 16 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew build publish curseforge publishModrinth --stacktrace --no-daemon | ||
env: | ||
curesforgeapikey: ${{secrets.CURESFORGEAPIKEY}} | ||
modrinthapikey: ${{secrets.MODRINTH}} | ||
mavenpassword: ${{secrets.MAVEN_PASSWORD}} | ||
- name: Zip create | ||
run: | | ||
cd build/libs | ||
zip release *.* | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: GMRG-Release | ||
path: build/libs | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: IamMusicPlayer - ${{ github.ref }} | ||
body: | | ||
The New Release! | ||
Build by ${{ github.actor }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./build/libs/release.zip | ||
asset_name: IamMusicPlayer.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,12 +25,43 @@ architectury { | |
publishing { | ||
publications { | ||
mavenCommon(MavenPublication) { | ||
artifactId = rootProject.archives_base_name | ||
artifactId = "${rootProject.archives_base_name}" | ||
/* artifact(remapJar) | ||
artifact(sourcesJar) { | ||
builtBy remapSourcesJar | ||
}*/ | ||
from components.java | ||
pom { | ||
name = 'IamMusicPlayer' | ||
description = 'The ikisugi music player mod.' | ||
licenses { | ||
license { | ||
name = 'GNU Lesser General Public License v3.0' | ||
url = 'https://www.gnu.org/licenses/lgpl-3.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'MORIMORI0317' | ||
name = 'MORIMORI0317' | ||
} | ||
developer { | ||
id = 'FelNull' | ||
name = 'TeamFelNull' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
|
||
maven { | ||
url "https://maven.felnull.dev/" | ||
credentials { | ||
username = "felnull" | ||
password = "${project.maven_put_pass}" != '' ? "${project.maven_put_pass}" : System.getenv('mavenpassword') | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
plugins { | ||
id "com.github.johnrengelman.shadow" version "7.0.0" | ||
id 'com.matthewprenger.cursegradle' version '1.4.0' | ||
id "com.modrinth.minotaur" version "1.2.1" | ||
} | ||
|
||
architectury { | ||
|
@@ -109,13 +111,95 @@ components.java { | |
publishing { | ||
publications { | ||
mavenFabric(MavenPublication) { | ||
artifactId = rootProject.archives_base_name + "-" + project.name | ||
from components.java | ||
artifactId = "${rootProject.archives_base_name}-${project.name}" | ||
artifact(remapJar) | ||
artifact(sourcesJar) { | ||
builtBy remapSourcesJar | ||
} | ||
pom { | ||
name = 'IamMusicPlayer' | ||
description = 'The ikisugi music player mod.' | ||
licenses { | ||
license { | ||
name = 'GNU Lesser General Public License v3.0' | ||
url = 'https://www.gnu.org/licenses/lgpl-3.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'MORIMORI0317' | ||
name = 'MORIMORI0317' | ||
} | ||
developer { | ||
id = 'FelNull' | ||
name = 'TeamFelNull' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
repositories { | ||
maven { | ||
url "https://maven.felnull.dev/" | ||
credentials { | ||
username = "felnull" | ||
password = "${project.maven_put_pass}" != '' ? "${project.maven_put_pass}" : System.getenv('mavenpassword') | ||
} | ||
} | ||
} | ||
} | ||
|
||
curseforge { | ||
if (System.getenv('curesforgeapikey') != null && "${project.curesforge_id}" != '') { | ||
apiKey = System.getenv('curesforgeapikey') | ||
project { | ||
id = "${rootProject.curesforge_id}" | ||
changelog = "" | ||
releaseType = "${rootProject.release_type}" | ||
addGameVersion "${rootProject.minecraft_version}" | ||
addGameVersion 'Java 16' | ||
addGameVersion "Fabric" | ||
|
||
relations { | ||
requiredDependency "fabric-api" | ||
requiredDependency "cloth-config" | ||
requiredDependency "architectury-fabric" | ||
requiredDependency "otyacraft-engine" | ||
} | ||
|
||
mainArtifact(file("${project.buildDir}/libs/${rootProject.archives_base_name}-${project.name}-${rootProject.minecraft_version}-${project.mod_version}.jar")) { | ||
displayName = "${rootProject.mod_display_name}-${rootProject.minecraft_version}-${project.mod_version}-Fabric" | ||
} | ||
|
||
addArtifact(file("${project.buildDir}/libs/${rootProject.archives_base_name}-${project.mod_version}-dev.jar")) { | ||
displayName = "${rootProject.mod_display_name}-${rootProject.minecraft_version}-${project.mod_version}-Fabric-dev" | ||
} | ||
addArtifact(file("${project.buildDir}/libs/${rootProject.archives_base_name}-${project.mod_version}-sources.jar")) { | ||
displayName = "${rootProject.mod_display_name}-${rootProject.minecraft_version}-${project.mod_version}-Fabric-sources" | ||
} | ||
afterEvaluate { | ||
uploadTask.dependsOn("build") | ||
} | ||
} | ||
} | ||
options { | ||
forgeGradleIntegration = false | ||
} | ||
} | ||
|
||
|
||
if (System.getenv('modrinthapikey') != null && "${modrinth_id}" != '') { | ||
task publishModrinth(type: com.modrinth.minotaur.TaskModrinthUpload) { | ||
token = System.getenv('modrinthapikey') | ||
projectId = "${rootProject.modrinth_id}" | ||
versionName = "${rootProject.mod_display_name}-${rootProject.minecraft_version}-${project.mod_version}-Fabric" | ||
versionNumber = "${rootProject.minecraft_version}-${project.mod_version}-Fabric" | ||
uploadFile = file("${project.buildDir}/libs/${rootProject.archives_base_name}-${project.name}-${rootProject.minecraft_version}-${project.mod_version}.jar") | ||
versionType = "${project.release_type}".toUpperCase() | ||
addGameVersion("${rootProject.minecraft_version}") | ||
addLoader("fabric") | ||
addGameVersion "${rootProject.minecraft_version}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
plugins { | ||
id "com.github.johnrengelman.shadow" version "7.0.0" | ||
id 'com.matthewprenger.cursegradle' version '1.4.0' | ||
id "com.modrinth.minotaur" version "1.2.1" | ||
} | ||
|
||
architectury { | ||
|
@@ -114,12 +116,85 @@ publishing { | |
publications { | ||
mavenForge(MavenPublication) { | ||
artifactId = rootProject.archives_base_name + "-" + project.name | ||
from components.java | ||
artifact(remapJar) | ||
artifact(sourcesJar) { | ||
builtBy remapSourcesJar | ||
} | ||
pom { | ||
name = 'IamMusicPlayer' | ||
description = 'The ikisugi music player mod.' | ||
licenses { | ||
license { | ||
name = 'GNU Lesser General Public License v3.0' | ||
url = 'https://www.gnu.org/licenses/lgpl-3.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'MORIMORI0317' | ||
name = 'MORIMORI0317' | ||
} | ||
developer { | ||
id = 'FelNull' | ||
name = 'TeamFelNull' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
repositories { | ||
maven { | ||
url "https://maven.felnull.dev/" | ||
credentials { | ||
username = "felnull" | ||
password = "${project.maven_put_pass}" != '' ? "${project.maven_put_pass}" : System.getenv('mavenpassword') | ||
} | ||
} | ||
} | ||
} | ||
|
||
curseforge { | ||
if (System.getenv('curesforgeapikey') != null && "${project.curesforge_id}" != '') { | ||
apiKey = System.getenv('curesforgeapikey') | ||
project { | ||
id = "${rootProject.curesforge_id}" | ||
changelog = "" | ||
releaseType = "${rootProject.release_type}" | ||
addGameVersion "${rootProject.minecraft_version}" | ||
addGameVersion 'Java 16' | ||
|
||
relations { | ||
requiredDependency "cloth-config-forge" | ||
requiredDependency "architectury-forge" | ||
requiredDependency "otyacraft-engine" | ||
} | ||
|
||
mainArtifact(file("${project.buildDir}/libs/${rootProject.archives_base_name}-${project.name}-${rootProject.minecraft_version}-${project.mod_version}.jar")) { | ||
displayName = "${rootProject.mod_display_name}-${rootProject.minecraft_version}-${project.mod_version}-Forge" | ||
} | ||
|
||
addArtifact(file("${project.buildDir}/libs/${rootProject.archives_base_name}-${project.mod_version}-dev.jar")) { | ||
displayName = "${rootProject.mod_display_name}-${rootProject.minecraft_version}-${project.mod_version}-Forge-dev" | ||
} | ||
addArtifact(file("${project.buildDir}/libs/${rootProject.archives_base_name}-${project.mod_version}-sources.jar")) { | ||
displayName = "${rootProject.mod_display_name}-${rootProject.minecraft_version}-${project.mod_version}-Forge-sources" | ||
} | ||
} | ||
} | ||
} | ||
|
||
if (System.getenv('modrinthapikey') != null && "${modrinth_id}" != '') { | ||
task publishModrinth(type: com.modrinth.minotaur.TaskModrinthUpload) { | ||
token = System.getenv('modrinthapikey') | ||
projectId = "${rootProject.modrinth_id}" | ||
versionName = "${rootProject.mod_display_name}-${rootProject.minecraft_version}-${project.mod_version}-Forge" | ||
versionNumber = "${rootProject.minecraft_version}-${project.mod_version}-Forge" | ||
uploadFile = file("${project.buildDir}/libs/${rootProject.archives_base_name}-${project.name}-${rootProject.minecraft_version}-${project.mod_version}.jar") | ||
versionType = "${project.release_type}".toUpperCase() | ||
addGameVersion("${rootProject.minecraft_version}") | ||
addLoader("forge") | ||
addGameVersion "${rootProject.minecraft_version}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters