-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and publish with GitHub Actions (#12)
- Loading branch information
1 parent
9df3aeb
commit d1e9174
Showing
7 changed files
with
54 additions
and
256 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,20 @@ | ||
name: Build and test PRs | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- synchronize | ||
- opened | ||
- ready_for_review | ||
- reopened | ||
push: | ||
branches: | ||
- 'feature/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
uses: neoforged/actions/.github/workflows/build-prs.yml@main | ||
with: | ||
java: 17 | ||
gradle_tasks: build |
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,21 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
statuses: write | ||
|
||
jobs: | ||
release: | ||
uses: neoforged/actions/.github/workflows/gradle-publish.yml@main | ||
with: | ||
java: 17 | ||
pre_gradle_tasks: '' | ||
gradle_tasks: publish | ||
secrets: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,16 +1,16 @@ | ||
plugins { | ||
id 'net.neoforged.gradleutils' version '[2.0.16,3)' | ||
id 'com.github.ben-manes.versions' version '0.39.0' | ||
id 'org.javamodularity.moduleplugin' version '1.8.10' | ||
id 'eclipse' | ||
id 'java-library' | ||
id 'maven-publish' | ||
id 'eclipse' | ||
id 'net.neoforged.gradleutils' version '3.0.0-alpha.4' | ||
id 'com.github.ben-manes.versions' version '0.39.0' | ||
id 'org.javamodularity.moduleplugin' version '1.8.10' | ||
} | ||
|
||
group 'cpw.mods' | ||
|
||
version = gradleutils.getTagOffsetVersion() | ||
logger.lifecycle("Version: $version") | ||
version = gradleutils.version | ||
logger.lifecycle("Version: {}", version) | ||
|
||
repositories { | ||
mavenLocal() | ||
|
@@ -30,48 +30,32 @@ java { | |
} | ||
|
||
changelog { | ||
fromTag "0.1" | ||
from '1.1' | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes( | ||
'Specification-Title': 'bootstraplauncher', | ||
'Specification-Vendor': 'neoforged', | ||
'Specification-Vendor': 'mcmodlauncher', | ||
'Specification-Version': '1', // We are version 1 of ourselves | ||
'Implementation-Title': project.name, | ||
'Implementation-Version': "${project.version}+${System.getenv("BUILD_NUMBER")?:0}+${gradleutils.gitInfo.branch}.${gradleutils.gitInfo.abbreviatedId}", | ||
'Implementation-Vendor':'neoforged', | ||
'Implementation-Timestamp': java.time.Instant.now().toString(), | ||
'Implementation-Version': "${project.version}+${gradleutils.gitInfo.branch}.${gradleutils.gitInfo.abbreviatedId}", | ||
'Implementation-Vendor':'mcmodlauncher', | ||
'Git-Commit': gradleutils.gitInfo.abbreviatedId, | ||
'Git-Branch': gradleutils.gitInfo.branch, | ||
'Build-Number': "${System.getenv("BUILD_NUMBER")?:0}", | ||
'Main-Class': 'cpw.mods.bootstraplauncher.BootstrapLauncher' | ||
) | ||
} | ||
} | ||
|
||
artifacts { | ||
archives jar | ||
archives sourcesJar | ||
} | ||
|
||
publishing { | ||
publications.register('mavenJava', MavenPublication) { | ||
from components.java | ||
pom { | ||
name = 'Bootstrap launcher' | ||
description = 'Allows bootstrapping a modularized environment from a classpath one' | ||
url = 'https://github.com/McModLauncher/bootstraplauncher' | ||
scm { | ||
url = 'https://github.com/McModLauncher/bootstraplauncher' | ||
connection = 'scm:git:[email protected]:McModLauncher/bootstraplauncher.git' | ||
developerConnection = 'scm:git:[email protected]:McModLauncher/bootstraplauncher.git' | ||
} | ||
issueManagement { | ||
system = 'github' | ||
url = 'https://github.com/McModLauncher/bootstraplauncher/issues' | ||
} | ||
pomUtils.githubRepo(it, 'bootstraplauncher', 'McModLauncher') | ||
developers { | ||
developer { | ||
id = 'cpw' | ||
|
@@ -81,7 +65,7 @@ publishing { | |
} | ||
} | ||
repositories { | ||
maven gradleutils.getPublishingForgeMaven() | ||
maven gradleutils.publishingMaven | ||
} | ||
} | ||
|
||
|
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,13 +1,5 @@ | ||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
maven { url = 'https://maven.neoforged.net/releases' } | ||
} | ||
} | ||
|
||
plugins { | ||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' | ||
} | ||
|
||
rootProject.name = 'bootstraplauncher' | ||
|
||
rootProject.name = 'bootstraplauncher' |