Added sonatype releases credentials

This commit is contained in:
Erik C. Thauvin 2023-04-08 13:51:27 -07:00
parent 32311785ea
commit a415c9fd21
3 changed files with 9 additions and 6 deletions

View file

@ -3,7 +3,7 @@ name: javadocs-pages
on: on:
# Runs on pushes targeting the default branch # Runs on pushes targeting the default branch
push: push:
branches: ["master"] branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:

View file

@ -3,7 +3,7 @@ name: Publish to the Maven Central
on: on:
workflow_dispatch: workflow_dispatch:
release: release:
types: [released] types: [ released ]
jobs: jobs:
build-bld-project: build-bld-project:
@ -33,4 +33,6 @@ jobs:
-DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/rife2-renderers -DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/rife2-renderers
-DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }} -DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
-Drife2Username=${{ secrets.RIFE2_USERNAME }} -Drife2Username=${{ secrets.RIFE2_USERNAME }}
-Drife2Password=${{ secrets.RIFE2_PASSWORD }} -Drife2Password=${{ secrets.RIFE2_PASSWORD }}
-DsonatypeUser=${{ secrets.SONATYPE_USER }}
-DsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}

View file

@ -27,11 +27,12 @@ public class TemplateRenderersBuild extends Project {
.link("https://rife2.github.io/rife2/"); .link("https://rife2.github.io/rife2/");
publishOperation() publishOperation()
.repository(version.isSnapshot() ? repository("https://repo.rife2.com/snapshots") .repository(version.isSnapshot() ? repository(RIFE2_SNAPSHOTS.location())
.withCredentials(property("rife2Username"), property("rife2Password")) .withCredentials(property("rife2Username"), property("rife2Password"))
: repository("https://repo.rife2.com/releases") : repository(RIFE2_RELEASES.location())
.withCredentials(property("rife2Username"), property("rife2Password"))) .withCredentials(property("rife2Username"), property("rife2Password")))
.repository(MAVEN_CENTRAL) .repository(repository(SONATYPE_RELEASES.location())
.withCredentials(property("sonatypeUser"), property("sonatypePassword")))
.info(new PublishInfo() .info(new PublishInfo()
.groupId("com.uwyn.rife2") .groupId("com.uwyn.rife2")
.artifactId("rife2-renderers") .artifactId("rife2-renderers")