mirror of
				https://github.com/GayPizzaSpecifications/drywall.git
				synced 2025-11-04 00:09:37 +00:00 
			
		
		
		
	maven publishing workflow
This commit is contained in:
		
							
								
								
									
										17
									
								
								.github/workflows/plugin.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								.github/workflows/plugin.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					name: Plugin
 | 
				
			||||||
 | 
					on: [push]
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  build:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Checkout Repository
 | 
				
			||||||
 | 
					        uses: actions/checkout@v3
 | 
				
			||||||
 | 
					      - name: Set up JDK 17
 | 
				
			||||||
 | 
					        uses: actions/setup-java@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          java-version: '17'
 | 
				
			||||||
 | 
					          distribution: 'temurin'
 | 
				
			||||||
 | 
					      - name: Build with Gradle
 | 
				
			||||||
 | 
					        uses: gradle/gradle-build-action@v2
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          arguments: build
 | 
				
			||||||
							
								
								
									
										23
									
								
								.github/workflows/publish.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/publish.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					name: Publish
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches:
 | 
				
			||||||
 | 
					      - master
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  publish:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Checkout Repository
 | 
				
			||||||
 | 
					        uses: actions/checkout@v3
 | 
				
			||||||
 | 
					      - name: Set up JDK 17
 | 
				
			||||||
 | 
					        uses: actions/setup-java@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          java-version: '17'
 | 
				
			||||||
 | 
					          distribution: 'temurin'
 | 
				
			||||||
 | 
					      - name: Publish with Gradle
 | 
				
			||||||
 | 
					        uses: gradle/gradle-build-action@v2
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          arguments: publishAllPublicationsToGitHubPackagesRepository publishAllPublicationsToGitLabRepository
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
 | 
				
			||||||
 | 
					          GITLAB_TOKEN: "${{ secrets.GITLAB_TOKEN }}"
 | 
				
			||||||
@ -1,6 +1,7 @@
 | 
				
			|||||||
plugins {
 | 
					plugins {
 | 
				
			||||||
	`kotlin-dsl`
 | 
						`kotlin-dsl`
 | 
				
			||||||
	kotlin("plugin.serialization") version "1.5.31"
 | 
						kotlin("plugin.serialization") version "1.5.31"
 | 
				
			||||||
 | 
						`maven-publish`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
group = "gay.pizza.foundation"
 | 
					group = "gay.pizza.foundation"
 | 
				
			||||||
@ -37,3 +38,41 @@ gradlePlugin {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					publishing {
 | 
				
			||||||
 | 
					  repositories {
 | 
				
			||||||
 | 
					    mavenLocal()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    var githubPackagesToken = System.getenv("GITHUB_TOKEN")
 | 
				
			||||||
 | 
					    if (githubPackagesToken == null) {
 | 
				
			||||||
 | 
					      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/drywall")
 | 
				
			||||||
 | 
					      credentials {
 | 
				
			||||||
 | 
					        username = project.findProperty("github.username") as String? ?: "gaypizzaspecifications"
 | 
				
			||||||
 | 
					        password = githubPackagesToken
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    maven {
 | 
				
			||||||
 | 
					      name = "GitLab"
 | 
				
			||||||
 | 
					      url = uri("https://gitlab.com/api/v4/projects/47347654/packages/maven")
 | 
				
			||||||
 | 
					      credentials(HttpHeaderCredentials::class.java) {
 | 
				
			||||||
 | 
					        name = "Private-Token"
 | 
				
			||||||
 | 
					        value = gitlabPackagesToken
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      authentication {
 | 
				
			||||||
 | 
					        create<HttpHeaderAuthentication>("header")
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user