-
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
90 additions
and
109 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: mcstatuskt-publish | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
if: ${{ github.repository == 't895/mcstatuskt' }} | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Set up Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- name: Give execution permissions to the gradle wrapper | ||
run: chmod +x ./gradlew | ||
- name: Create secrets file | ||
run: | | ||
echo "${{secrets.SIGNING_SECRET_KEYRING_BASE64}}" | base64 --decode > ${HOME}/keyring.asc | ||
gpg --output ${HOME}/keyring.asc.gpg --dearmor ${HOME}/keyring.asc | ||
- name: Set up environment | ||
run: | | ||
echo "mavenCentralUsername=${{secrets.MAVEN_USERNAME}}" >> gradle.properties | ||
echo "mavenCentralPassword=${{secrets.MAVEN_PASSWORD}}" >> gradle.properties | ||
echo "signing.keyId=${{secrets.SIGNING_KEY_ID}}" >> gradle.properties | ||
echo "signing.password=${{secrets.SIGNING_PASSWORD}}" >> gradle.properties | ||
echo "signing.secretKeyRingFile=${HOME}/keyring.asc.gpg" >> gradle.properties | ||
- name: Setup Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
- name: Build and publish | ||
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache |
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 was deleted.
Oops, something went wrong.
99 changes: 0 additions & 99 deletions
99
convention-plugins/src/main/kotlin/convention.publication.gradle.kts
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
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 |
---|---|---|
|
@@ -28,5 +28,4 @@ dependencyResolutionManagement { | |
mavenCentral() | ||
} | ||
} | ||
includeBuild("convention-plugins") | ||
include(":shared") |
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,15 @@ | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
|
||
plugins { | ||
alias(libs.plugins.multiplatform) | ||
alias(libs.plugins.android.library) | ||
alias(libs.plugins.kotlinx.serialization) | ||
id("org.jetbrains.kotlinx.atomicfu") | ||
id("convention.publication") | ||
id("com.vanniktech.maven.publish") | ||
} | ||
|
||
group = "com.t895.mcstatuskt" | ||
version = "1.0" | ||
version = "0.1.0" | ||
|
||
kotlin { | ||
jvmToolchain(17) | ||
|
@@ -74,3 +76,47 @@ android { | |
minSdk = 21 | ||
} | ||
} | ||
|
||
mavenPublishing { | ||
// Define coordinates for the published artifact | ||
coordinates( | ||
groupId = "io.github.t895", | ||
artifactId = "mcstatuskt", | ||
version = "0.1.0" | ||
) | ||
|
||
// Configure POM metadata for the published artifact | ||
pom { | ||
name.set("mcstatuskt") | ||
description.set("Simple Minecraft Server pinger") | ||
inceptionYear.set("2024") | ||
url.set("https://github.com/t895/mcstatuskt") | ||
|
||
licenses { | ||
license { | ||
name.set("GPLv3") | ||
url.set("https://opensource.org/licenses/gpl-3-0") | ||
} | ||
} | ||
|
||
// Specify developer information | ||
developers { | ||
developer { | ||
id.set("t895") | ||
name.set("Charles Lombardo") | ||
email.set("[email protected]") | ||
} | ||
} | ||
|
||
// Specify SCM information | ||
scm { | ||
url.set("https://github.com/t895/mcstatuskt") | ||
} | ||
} | ||
|
||
// Configure publishing to Maven Central | ||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) | ||
|
||
// Enable GPG signing for all publications | ||
signAllPublications() | ||
} |