GitLab Publishing

This commit is contained in:
2023-01-24 20:26:25 -08:00
parent a06be05645
commit 426020f1f9
2 changed files with 21 additions and 1 deletions

View File

@ -17,4 +17,6 @@ jobs:
- name: Publish with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: publishAllPublicationsToGitHubPackagesRepository
arguments: publishAllPublicationsToGitLabRepository
env:
GITLAB_TOKEN: "${{ secrets.GITLAB_TOKEN }}"

View File

@ -69,6 +69,11 @@ publishing {
githubPackagesToken = project.findProperty("github.token") as String?
}
var gitlabPackagesToken = System.getenv("GITLAB_TOKEN")
if (gitlabPackagesToken == null) {
gitlabPackagesToken = project.findProperty("gitlab.com.accessToken") as String?
}
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/gaypizzaspecifications/concrete")
@ -77,6 +82,19 @@ publishing {
password = githubPackagesToken
}
}
maven {
name = "GitLab"
url = uri("https://gitlab.com/api/v4/projects/42873094/packages/maven")
credentials(HttpHeaderCredentials::class.java) {
name = "Private-Token"
value = gitlabPackagesToken
}
authentication {
create<HttpHeaderAuthentication>("header")
}
}
}
}