Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

Commit 191f41e

Browse files
authored
Add flint distributor as deployment target (#60)
Add flint distributor as deployment target
1 parent 66b2ea7 commit 191f41e

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ jobs:
106106
if: github.ref == 'refs/heads/master'
107107
run: "./gradlew -PCI=true -PenableSigning -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight -Pultralight-java.gpu.native-binaries-folder=native-binaries/ultralight-gpu publish"
108108
env:
109+
FLINT_DISTRIBUTOR_PUBLISH_TOKEN: ${{ secrets.FLINT_DISTRIBUTOR_PUBLISH_TOKEN }}
110+
FLINT_DISTRIBUTOR_URL: ${{ secrets.FLINT_DISTRIBUTOR_URL }}
109111
SIGNING_KEY: ${{ secrets.signingKey }}
110112
SIGNING_PASSWORD: ${{ secrets.signingPassword }}
111113
OSSHR_USER: ${{ secrets.osshrUser }}

build.gradle

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,35 @@ ext.commonPublish = { Project currentProject, Closure config ->
3131
password getAuthenticationProperty("osshrPassword", "OSSHR_PASSWORD")
3232
}
3333
}
34+
35+
maven {
36+
def distributorUrl = System.getenv("FLINT_DISTRIBUTOR_URL")
37+
38+
if (distributorUrl == null && project.hasProperty("net.flintmc.distributor.url")) {
39+
distributorUrl = project.property("net.flintmc.distributor.url").toString()
40+
}
41+
42+
setUrl(distributorUrl)
43+
44+
name = "Flint"
45+
46+
def publishToken = System.getenv("FLINT_DISTRIBUTOR_PUBLISH_TOKEN")
47+
48+
if (publishToken == null && project.hasProperty("net.flintmc.distributor.publish-token")) {
49+
publishToken = project.property("net.flintmc.distributor.publish-token").toString()
50+
}
51+
52+
if (publishToken != null) {
53+
credentials(HttpHeaderCredentials.class) {
54+
name = "Publish-Token"
55+
value = publishToken
56+
}
57+
58+
authentication {
59+
create("header", HttpHeaderAuthentication.class)
60+
}
61+
}
62+
}
3463
}
3564
}
3665

0 commit comments

Comments
 (0)