Skip to content

Commit c8e6029

Browse files
Merge pull request #9 from OneLiteFeatherNET/feature/deployment
Add Maven repository configuration for OneLiteFeather
2 parents d1afe3a + a148bd0 commit c8e6029

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish JAR
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
create:
9+
tags:
10+
- *
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
- name: Set up JDK 21
20+
uses: actions/setup-java@v3
21+
with:
22+
distribution: 'temurin'
23+
java-version: '21'
24+
25+
- name: Build with Gradle
26+
run: ./gradlew build
27+
28+
- name: Publish to Maven
29+
run: ./gradlew publish
30+
env:
31+
ONELITEFEATHER_MAVEN_USERNAME: ${{ secrets.ONELITEFEATHER_MAVEN_USERNAME }}
32+
ONELITEFEATHER_MAVEN_PASSWORD: ${{ secrets.ONELITEFEATHER_MAVEN_PASSWORD }}

build.gradle.kts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,24 @@ dependencies {
2424

2525

2626
publishing {
27+
repositories {
28+
maven {
29+
name = "OneLiteFeatherRepository"
30+
url = if (project.version.toString().contains("SNAPSHOT")) {
31+
uri("https://repo.onelitefeather.dev/onelitefeather-snapshots")
32+
} else {
33+
uri("https://repo.onelitefeather.dev/onelitefeather-releases")
34+
}
35+
credentials {
36+
username = System.getenv("ONELITEFEATHER_MAVEN_USERNAME")
37+
password = System.getenv("ONELITEFEATHER_MAVEN_PASSWORD")
38+
}
39+
credentials(PasswordCredentials::class)
40+
authentication {
41+
create<BasicAuthentication>("basic")
42+
}
43+
}
44+
}
2745
publications {
2846
create<MavenPublication>("maven") {
2947
pom {

0 commit comments

Comments
 (0)