File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed
Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 3131 ORG_GRADLE_PROJECT_signingKey : ${{ secrets.PACKAGE_SIGNING_KEY }}
3232 ORG_GRADLE_PROJECT_signingKeyPassword : ${{ secrets.PACKAGE_SIGNING_KEY_PASSWORD }}
3333 ORG_GRADLE_PROJECT_githubRepository : ${{ github.repository }}
34+ ORG_GRADLE_PROJECT_githubToken : ${{ github.token }}
3435 ORG_GRADLE_PROJECT_ossrhUsername : ${{ secrets.OSSRH_USERNAME }}
3536 ORG_GRADLE_PROJECT_ossrhPassword : ${{ secrets.OSSRH_PASSWORD }}
3637
6061 ORG_GRADLE_PROJECT_githubRepository : ${{ github.repository }}
6162 - name : Publish Documentation
626363- env :
64- ACTIONS_DEPLOY_KEY : ${{ secrets.GH_PAGES_DEPLOY_KEY }}
65- PUBLISH_BRANCH : gh-pages
66- PUBLISH_DIR : ./build/dokka
6764 with :
68- emptyCommits : false
65+ publish_dir : ./build/dokka
66+ deploy_key : ${{ secrets.GH_PAGES_DEPLOY_KEY }}
Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ artifacts {
7878}
7979
8080lateinit var publication: MavenPublication
81- lateinit var releaseRepository: NexusRepository
81+ lateinit var githubPackages: ArtifactRepository
82+ lateinit var mavenCentral: NexusRepository
8283
8384publishing {
8485 publications {
@@ -121,11 +122,20 @@ publishing {
121122 }
122123 }
123124 }
125+ repositories {
126+ githubPackages = maven(" https://maven.pkg.github.com/$githubRepository " ) {
127+ name = " GitHubPackages"
128+ credentials {
129+ username = githubOwner
130+ password = githubToken
131+ }
132+ }
133+ }
124134}
125135
126136nexusPublishing {
127137 repositories {
128- releaseRepository = sonatype {
138+ mavenCentral = sonatype {
129139 username.set(ossrhUsername)
130140 password.set(ossrhPassword)
131141 }
@@ -145,12 +155,14 @@ nexusStaging {
145155}
146156
147157val closeAndReleaseRepository by project.tasks
148- closeAndReleaseRepository.mustRunAfter(releaseRepository.publishTask)
158+ closeAndReleaseRepository.mustRunAfter(mavenCentral.publishTask)
159+ val publish by tasks
160+
149161
150162task(" release" ) {
151163 group = " release"
152164 description = " Releases the project to Maven Central"
153- dependsOn(releaseRepository.publishTask , closeAndReleaseRepository)
165+ dependsOn(publish , closeAndReleaseRepository)
154166}
155167
156168idea {
You can’t perform that action at this time.
0 commit comments