@@ -162,7 +162,7 @@ if (!isRelease || isMainBranch) { // Only publish releases from the main branch
162162 hangarPublish {
163163 publications.register(" BetterGoPaint" ) {
164164 version.set(suffixedVersion)
165- channel.set(if (isRelease) " Release" else if (isMainBranch) " Snapshot" else " Alpha " )
165+ channel.set(if (isRelease) " Release" else " Snapshot" )
166166 changelog.set(changelogContent)
167167 apiKey.set(System .getenv(" HANGAR_SECRET" ))
168168 id.set(" BetterGoPaint" )
@@ -178,7 +178,7 @@ if (!isRelease || isMainBranch) { // Only publish releases from the main branch
178178 modrinth {
179179 token.set(System .getenv(" MODRINTH_TOKEN" ))
180180 projectId.set(" qf7sNg9A" )
181- versionType.set(if (isRelease) " release" else if (isMainBranch) " beta" else " alpha " )
181+ versionType.set(if (isRelease) " release" else " beta" )
182182 versionNumber.set(suffixedVersion)
183183 versionName.set(suffixedVersion)
184184 changelog.set(changelogContent)
@@ -189,3 +189,26 @@ if (!isRelease || isMainBranch) { // Only publish releases from the main branch
189189 loaders.add(" folia" )
190190 }
191191}
192+
193+ publishing {
194+ publications.create<MavenPublication >(" maven" ) {
195+ // Configure our maven publication
196+ publishData.configurePublication(this )
197+ }
198+
199+ repositories {
200+ // We add EldoNexus as our repository. The used url is defined by the publish data.
201+ maven {
202+ authentication {
203+ credentials(PasswordCredentials ::class ) {
204+ // Those credentials need to be set under "Settings -> Secrets -> Actions" in your repository
205+ username = System .getenv(" ELDO_USERNAME" )
206+ password = System .getenv(" ELDO_PASSWORD" )
207+ }
208+ }
209+
210+ name = " EldoNexus"
211+ setUrl(publishData.getRepository())
212+ }
213+ }
214+ }
0 commit comments