-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to actions and publish to central
- Loading branch information
1 parent
9119570
commit e85f991
Showing
5 changed files
with
87 additions
and
185 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,30 @@ | ||
name: Build and test PRs | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- synchronize | ||
- opened | ||
- ready_for_review | ||
- reopened | ||
|
||
jobs: | ||
jdk8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1000 | ||
fetch-tags: true | ||
|
||
- name: Setup JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
|
||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: 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,28 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
statuses: write | ||
|
||
jobs: | ||
build: | ||
uses: neoforged/actions/.github/workflows/gradle-publish.yml@main | ||
with: | ||
java: 8 | ||
pre_gradle_tasks: ':test' | ||
gradle_tasks: ':publish closeAndReleaseSonatypeStagingRepository' | ||
secrets: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
|
||
MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
|
||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
|
||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }} |
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,9 +1,11 @@ | ||
plugins { | ||
id 'java' | ||
id 'groovy' | ||
id 'signing' | ||
id 'maven-publish' | ||
id 'org.cadixdev.licenser' version '0.6.1' | ||
id 'net.neoforged.gradleutils' version '2.+' | ||
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0' | ||
} | ||
|
||
group = 'net.neoforged' | ||
|
@@ -68,13 +70,11 @@ dependencies { | |
tasks.withType(Jar).configureEach { | ||
manifest.attributes([ | ||
'Specification-Title' : 'GroovyDSLImprover', | ||
'Specification-Vendor' : 'MinecraftForge', | ||
'Specification-Vendor' : 'neoforged', | ||
'Implementation-Title' : project.name, | ||
'Implementation-Version': project.version, | ||
'Implementation-Vendor' : 'MinecraftForge', | ||
'Git-Commit' : gradleutils.gitInfo.abbreviatedId, | ||
'Git-Branch' : gradleutils.gitInfo.branch, | ||
'Build-Number' : "${System.getenv('BUILD_NUMBER') ?: 0}" | ||
'Implementation-Vendor' : 'neoforged', | ||
'Git-Commit' : gradleutils.gitInfo.abbreviatedId | ||
]) | ||
} | ||
|
||
|
@@ -87,6 +87,16 @@ test { | |
useJUnitPlatform() | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
username.set(System.getenv('SONATYPE_USER') ?: '') | ||
password.set(System.getenv('SONATYPE_PASSWORD') ?: '') | ||
nexusUrl.set(uri('https://s01.oss.sonatype.org/service/local/')) | ||
} | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
|
@@ -96,15 +106,15 @@ publishing { | |
pom { | ||
name = 'GroovyDSLImprover' | ||
description = 'Groovy Compiler Plugin to improve building Groovy based DSLs, like those used in Gradle.' | ||
url = 'https://github.com/MinecraftForge/GroovyDSLImprover' | ||
url = 'https://github.com/neoforged/GroovyDSLImprover' | ||
scm { | ||
url = 'https://github.com/MinecraftForge/GroovyDSLImprover' | ||
connection = 'scm:git:git://github.com/MinecraftForge/GroovyDSLImprover.git' | ||
developerConnection = 'scm:git:[email protected]:MinecraftForge/GroovyDSLImprover.git' | ||
url = 'https://github.com/neoforged/GroovyDSLImprover' | ||
connection = 'scm:git:git://github.com/neoforged/GroovyDSLImprover.git' | ||
developerConnection = 'scm:git:[email protected]:neoforged/GroovyDSLImprover.git' | ||
} | ||
issueManagement { | ||
system = 'github' | ||
url = 'https://github.com/MinecraftForge/GroovyDSLImprover/issues' | ||
url = 'https://github.com/neoforged/GroovyDSLImprover/issues' | ||
} | ||
|
||
licenses { | ||
|
@@ -126,4 +136,13 @@ publishing { | |
repositories { | ||
maven gradleutils.getPublishingForgeMaven() | ||
} | ||
} | ||
|
||
if (System.getenv('GPG_PRIVATE_KEY')) { | ||
signing { | ||
final signingKey = System.getenv('GPG_PRIVATE_KEY') ?: '' | ||
final signingPassword = System.getenv('GPG_KEY_PASSWORD') ?: '' | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign publishing.publications.mavenJava | ||
} | ||
} |