-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
7 changed files
with
113 additions
and
35 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,40 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: | ||
- released | ||
jobs: | ||
build: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '8' | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradlew- | ||
- uses: crazy-max/[email protected] | ||
with: | ||
gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}" | ||
passphrase: "${{ secrets.GPG_PASSPHRASE }}" | ||
|
||
- run: | | ||
[[ "${{ github.event.release.tag_name }}" =~ ^[0-9]+(\.[0-9]+)*$ ]] || exit -1 | ||
chmod +x gradlew | ||
./gradlew -Psign-required=true publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion="${{ github.event.release.tag_name }}" -Psigning.gnupg.keyName="${{ secrets.GPG_SECRET_KEY_ID }}" -Psigning.gnupg.passphrase="${{ secrets.GPG_PASSPHRASE }}" -PsonatypeUsername="${{ secrets.SONATYPE_USERNAME }}" -PsonatypePassword="${{ secrets.SONATYPE_PASSWORD }}" |
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ build/ | |
.settings/ | ||
**/bin/ | ||
.vscode/ | ||
.kotlin/ |
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 |
---|---|---|
|
@@ -7,7 +7,3 @@ repositories { | |
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation(libs.indra) | ||
} |
62 changes: 41 additions & 21 deletions
62
buildSrc/src/main/kotlin/tr.com.infumia.pubsub.build.publishing.gradle.kts
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,33 +1,53 @@ | ||
plugins { | ||
id("net.kyori.indra") | ||
id("net.kyori.indra.publishing") | ||
signing | ||
`maven-publish` | ||
} | ||
|
||
val projectName = project.property("artifact-id") as String | ||
val signRequired = project.hasProperty("sign-required") | ||
|
||
indra { | ||
mitLicense() | ||
github("infumia", "pubsub") | ||
configurePublications { | ||
artifactId = projectName | ||
publishing { | ||
publications { | ||
val publication = create<MavenPublication>("maven") { | ||
groupId = project.group.toString() | ||
artifactId = projectName | ||
version = project.version.toString() | ||
|
||
pom { | ||
name = projectName | ||
inceptionYear = "2024" | ||
description = "Simplified pubsub library for Redis and various databases." | ||
developers { | ||
developer { | ||
name = "Hasan Demirtaş" | ||
url = "https://github.com/portlek/" | ||
from(components["java"]) | ||
artifact(tasks["sourcesJar"]) | ||
artifact(tasks["javadocJar"]) | ||
|
||
pom { | ||
name.set(projectName) | ||
description.set("Simplified pubsub library for Redis and various databases.") | ||
url.set("https://github.com/Infumia/") | ||
licenses { | ||
license { | ||
name.set("MIT License") | ||
url.set("https://mit-license.org/license.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("portlek") | ||
name.set("Hasan Demirtaş") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:git://github.com/infumia/pubsub.git") | ||
developerConnection.set("scm:git:ssh://github.com/infumia/pubsub.git") | ||
url.set("https://github.com/infumia/pubsub/") | ||
} | ||
} | ||
organization { | ||
name = "Infumia" | ||
url = "https://github.com/infumia/" | ||
} | ||
|
||
signing { | ||
isRequired = signRequired | ||
if (isRequired) { | ||
useGpgCmd() | ||
sign(publication) | ||
} | ||
} | ||
} | ||
if (project.hasProperty("sign-required")) { | ||
signWithKeyFromPrefixedProperties("infumia") | ||
} | ||
} |
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