Skip to content

Commit

Permalink
ci: fix maven publish (#265)
Browse files Browse the repository at this point in the history
* ci: fix maven publish

* ci: revert osshr username and password, ktlint, and modify osshr username and password correctly
  • Loading branch information
xavimolloy authored Jul 3, 2024
1 parent d427434 commit fb271f5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Publish to maven
run: ./.github/workflows/scripts/publish-maven.sh
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_USERNAME: ${{ secrets.SONATYPE_OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
SIGNING_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }}
SIGNING_PASSWORD: ${{ secrets.PGP_PASSPHRASE }}
14 changes: 11 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

version = "0.2-SNAPSHOT"
group = "org.hisp.dhis.mobile"

plugins {
Expand All @@ -13,6 +13,14 @@ plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
}

/**
* Property from the Gradle command line. To remove the snapshot suffix from the version.
*/
if (project.hasProperty("removeSnapshotSuffix")) {
val mainVersion = (version as String).split("-SNAPSHOT")[0]
version = mainVersion
}

allprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
ktlint {
Expand Down Expand Up @@ -71,8 +79,8 @@ subprojects {
}
}

val ossrhUsername: String? = System.getenv("SONATYPE_OSSRH_USERNAME")
val ossrhPassword: String? = System.getenv("SONATYPE_OSSRH_PASSWORD")
val ossrhUsername: String? = System.getenv("OSSRH_USERNAME")
val ossrhPassword: String? = System.getenv("OSSRH_PASSWORD")

nexusPublishing {
this.repositories {
Expand Down
12 changes: 2 additions & 10 deletions designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version = "0.2-SNAPSHOT"
group = "org.hisp.dhis.mobile"
version = rootProject.version
group = rootProject.group

plugins {
kotlin("multiplatform")
Expand All @@ -9,14 +9,6 @@ plugins {
id("app.cash.paparazzi").version("1.3.3")
}

/**
* Property from the Gradle command line. To remove the snapshot suffix from the version.
*/
if (project.hasProperty("removeSnapshotSuffix")) {
val mainVersion = (version as String).split("-SNAPSHOT")[0]
version = mainVersion
}

kotlin {
androidTarget {
publishLibraryVariants("release")
Expand Down

0 comments on commit fb271f5

Please sign in to comment.