mirror of
https://github.com/GayPizzaSpecifications/dough.git
synced 2025-08-02 21:20:55 +00:00
Publish to GitLab Package Registry
This commit is contained in:
parent
ff1c275589
commit
ead67199fd
3
.github/workflows/publish.yml
vendored
3
.github/workflows/publish.yml
vendored
@ -17,6 +17,7 @@ jobs:
|
||||
- name: Publish with Gradle
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: publishAllPublicationsToGitHubPackagesRepository
|
||||
arguments: publishAllPublicationsToGitHubPackagesRepository publishAllPublicationsToGitLabRepository
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
GITLAB_TOKEN: "${{ secrets.GITLAB_TOKEN }}"
|
||||
|
@ -13,6 +13,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/dough")
|
||||
@ -21,5 +26,18 @@ publishing {
|
||||
password = githubPackagesToken
|
||||
}
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "GitLab"
|
||||
url = uri("https://gitlab.com/api/v4/projects/49101454/packages/maven")
|
||||
credentials(HttpHeaderCredentials::class.java) {
|
||||
name = "Private-Token"
|
||||
value = gitlabPackagesToken
|
||||
}
|
||||
|
||||
authentication {
|
||||
create<HttpHeaderAuthentication>("header")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user