Skip to content

Commit

Permalink
maven repo
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Aug 5, 2024
1 parent 5e3a301 commit f19356e
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish-maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish to CloudSmith Maven

on:
workflow_dispatch:
release:
types:
- published

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 21
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts*', '**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle.kts', 'build.gradle') }}
- uses: gradle/wrapper-validation-action@v2
- run: |
chmod +x gradlew
- name: Publish package
run: ./gradlew publish
env:
CLOUDSMITH_MAVEN_TOKEN: ${{ secrets.CLOUDSMITH_MAVEN_TOKEN }}
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
alias libs.plugins.architectury
alias libs.plugins.shadow apply false
alias libs.plugins.spotless apply false
id 'maven-publish'
}

architectury {
Expand Down Expand Up @@ -57,7 +58,17 @@ subprojects {
from components.java
}
}

repositories {
maven {
name = "KessokuLib"
url = "https://maven.cloudsmith.io/kessokuteatime/kessokulib/"

credentials {
username = "tex-true"
password = System.getenv("CLOUDSMITH_MAVEN_TOKEN")
}
}
}
}
}
2 changes: 1 addition & 1 deletion event-base-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = "band.kessoku.lib.event"
version = libs.versions.mod.get() + "+common." + libs.versions.minecraft.get()

base {
archivesName = rootProject.name + "-eventbase"
archivesName = rootProject.name + "-event-base"
}

architectury {
Expand Down
2 changes: 1 addition & 1 deletion event-base-fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ group = "band.kessoku.lib.event"
version = libs.versions.mod.get() + "+fabric." + libs.versions.minecraft.get()

base {
archivesName = rootProject.name + "-eventbase"
archivesName = rootProject.name + "-event-base"
}

architectury {
Expand Down
2 changes: 1 addition & 1 deletion event-base-neo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ group = "band.kessoku.lib.event"
version = libs.versions.mod.get() + "+neoforge." + libs.versions.minecraft.get()

base {
archivesName = rootProject.name + "-eventbase"
archivesName = rootProject.name + "-event-base"
}

architectury {
Expand Down
2 changes: 1 addition & 1 deletion lifecycle-events-common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group = "band.kessoku.lib.event"
group = "band.kessoku.lib.events.lifecycle"
version = libs.versions.mod.get() + "+common." + libs.versions.minecraft.get()

base {
Expand Down
2 changes: 1 addition & 1 deletion lifecycle-events-fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'com.github.johnrengelman.shadow'
}

group = "band.kessoku.lib.event"
group = "band.kessoku.lib.events.lifecycle"
version = libs.versions.mod.get() + "+fabric." + libs.versions.minecraft.get()

base {
Expand Down
2 changes: 1 addition & 1 deletion lifecycle-events-neo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'com.github.johnrengelman.shadow'
}

group = "band.kessoku.lib.event"
group = "band.kessoku.lib.events.lifecycle"
version = libs.versions.mod.get() + "+neoforge." + libs.versions.minecraft.get()

base {
Expand Down

0 comments on commit f19356e

Please sign in to comment.