Skip to content

Commit

Permalink
new: Add FlashyReese's maven repository
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed Apr 23, 2024
1 parent e9200ac commit 9e529c6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ jobs:
restore-keys: |
${{ runner.os }}-build-commit-
- name: Build artifacts
run: ./gradlew build
run: ./gradlew build publishMavenJavaPublicationToFlashyReeseSnapshotsRepository
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
29 changes: 29 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ plugins {
// is not reachable for some reason, and it makes builds much more reproducible. Observation also shows that it
// really helps to improve startup times on slow connections.
id("fabric-loom") version "1.6.5"
id("maven-publish")
}

base {
Expand All @@ -36,6 +37,7 @@ loom {
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}

sourceSets {
Expand Down Expand Up @@ -144,3 +146,30 @@ fun createVersionString(): String {

return builder.toString()
}

publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}

repositories {
maven {
name = "FlashyReeseReleases"
setUrl(uri("https://maven.flashyreese.me/releases"))
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
maven {
name = "FlashyReeseSnapshots"
setUrl(uri("https://maven.flashyreese.me/snapshots"))
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}

0 comments on commit 9e529c6

Please sign in to comment.