Skip to content

Commit

Permalink
Use new maven repo and publishing setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kale-Ko committed Dec 23, 2023
1 parent cc08331 commit bb346cf
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 27 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ jobs:
with:
arguments: build
env:
GH_PACKAGES_USER: Kale-Ko
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
MAVEN_TYPE: release
GH_PACKAGES_USER: ${{ secrets.GH_PACKAGES_USER }}
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
10 changes: 8 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,21 @@ jobs:
with:
arguments: build
env:
GH_PACKAGES_USER: Kale-Ko
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
MAVEN_TYPE: release
GH_PACKAGES_USER: ${{ secrets.GH_PACKAGES_USER }}
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}

- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@v2
with:
arguments: publish
env:
GH_PACKAGES_USER: Kale-Ko
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
MAVEN_TYPE: release
GH_PACKAGES_USER: ${{ secrets.GH_PACKAGES_USER }}
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}

- name: Publish to Github Pages
Expand Down
51 changes: 37 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ project.group = "io.github.kale_ko"
project.version = project.project_version

repositories {
if (project.useLocal) {
mavenLocal()
}
mavenCentral()

maven {
name = "GitHub-Packages"
url = "https://maven.pkg.github.com/Kale-Ko/BJSL"
name = "Kales-Maven"
url = "https://maven.kaleko.dev/public-snapshot/"

credentials {
username = System.getenv("GH_PACKAGES_USER")
password = System.getenv("GH_PACKAGES_TOKEN")
username = System.getenv("MAVEN_USER")
password = System.getenv("MAVEN_TOKEN")
}
}
mavenCentral()
}

dependencies {
Expand Down Expand Up @@ -84,6 +80,12 @@ build {
javadoc {
title = project.name + " " + project.version

options.encoding = "UTF-8"
options.locale = "en"

options.author = true
options.version = true

doFirst {
mkdir "./build/"
mkdir "./build/docs/"
Expand All @@ -98,12 +100,33 @@ javadoc {
publishing {
repositories {
maven {
name = "GitHub-Packages"
url = "https://maven.pkg.github.com/Kale-Ko/EJCL"
name = "Kales-Maven"
url = "https://maven.kaleko.dev/public-snapshot/"

credentials {
username = System.getenv("GH_PACKAGES_USER")
password = System.getenv("GH_PACKAGES_TOKEN")
username = System.getenv("MAVEN_USER")
password = System.getenv("MAVEN_TOKEN")
}
}

if ("release".equalsIgnoreCase(System.getenv("MAVEN_TYPE"))) {
maven {
name = "Kales-Maven"
url = "https://maven.kaleko.dev/public-release/"

credentials {
username = System.getenv("MAVEN_USER")
password = System.getenv("MAVEN_TOKEN")
}
}
maven {
name = "GitHub-Packages"
url = "https://maven.pkg.github.com/Kale-Ko/EJCL/"

credentials {
username = System.getenv("GH_PACKAGES_USER")
password = System.getenv("GH_PACKAGES_TOKEN")
}
}
}
}
Expand Down Expand Up @@ -138,7 +161,7 @@ publishing {
scmNode.appendNode("connection", "scm:git:[email protected]:Kale-Ko/EJCL.git")
scmNode.appendNode("developerConnection", "scm:git:[email protected]:Kale-Ko/EJCL.git")
scmNode.appendNode("tag", "master")
scmNode.appendNode("url", "https://github.com/Kale-Ko/EJCL")
scmNode.appendNode("url", "https://github.com/Kale-Ko/EJCL/")

def dependenciesNode = node.appendNode("dependencies")

Expand Down
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ org.gradle.caching=true

java_version=11

project_version=3.9.1
project_version=3.9.2
project_description=An advanced configuration library for Java with support for local files, mysql databases, and more.

useLocal=false
bjsl_version=1.10.5
bjsl_version=1.10.6

mysql_connector_version=8.0.33
7 changes: 0 additions & 7 deletions jitpack.yml

This file was deleted.

0 comments on commit bb346cf

Please sign in to comment.