Skip to content

Commit

Permalink
Merge branch 'release/v0.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Xharos committed May 20, 2024
2 parents 66250f4 + f683785 commit cb797fb
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name : Setup Java 21
- name : Setup Java 20
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '20'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew shadowJar
run: ./gradlew shadowJar
- name: Publish to GitHub Packages
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
run: ./gradlew publish
env:
USERNAME: ${{ secrets.GPR_ACTOR }}
TOKEN: ${{ secrets.GPR_TOKEN }}
50 changes: 49 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "fr.islandswars"
version = "0.2.1"
version = "0.2.2"

repositories {
mavenCentral()
Expand Down Expand Up @@ -34,4 +34,52 @@ tasks.shadowJar {
manifest {
attributes["Main-Class"] = "fr.islandswars.commons.Commons"
}
}

publishing {
publications {
create<MavenPublication>("gpr") {
project.shadow.component(this)

groupId = rootProject.group.toString()
artifactId = rootProject.name
version = version

pom {
name.set(rootProject.name)
description.set("Utility classes for connecting to islands-wars database")
url.set("https://github.com/islands-wars/commons")

licenses {
license {
name.set("The GNU General Public License, Version 3.0")
url.set("https://www.gnu.org/licenses/gpl-3.0.html#license-text")
}
}
developers {
developer {
id.set("Xharos")
name.set("Burgaud Valentin")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/islands-wars/commons.git")
developerConnection.set("scm:git:ssh://github.com:islands-wars/commons.git")
url.set("https://github.com/islands-wars/commons")
}
}
}
}

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/islands-wars/commons")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.token") as String? ?: System.getenv("TOKEN")
}
}
}
}

0 comments on commit cb797fb

Please sign in to comment.