Skip to content

Commit

Permalink
fix: publish to OSSHR repository (#188)
Browse files Browse the repository at this point in the history
Signed-off-by: Yurii Shynbuiev <[email protected]>
Signed-off-by: Hyperledger Bot <[email protected]>
Co-authored-by: Hyperledger Bot <[email protected]>
  • Loading branch information
yshyn-iohk and hyperledger-bot authored Aug 7, 2024
1 parent 635db86 commit 8f98b5a
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 107 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:

- name: "Install Java ${{ env.JAVA_VERSION }}"
uses: actions/setup-java@v4
continue-on-error: true
with:
java-version: "${{ env.JAVA_VERSION }}"
distribution: zulu
Expand All @@ -56,9 +57,9 @@ jobs:
/bin/bash -c "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: "Install autoconf, automake, libtool"
- name: "Install autoconf, automake, libtool, rustup"
run: |
brew install autoconf automake libtool
brew install autoconf automake libtool rustup
- name: "Install Mac ToolChain"
run: |
Expand Down Expand Up @@ -106,7 +107,7 @@ jobs:
id: import_gpg
with:
gpg_private_key: ${{ secrets.HYP_BOT_GPG_PRIVATE }}
passphrase: ${{ secrets.HYP_BOT_GPG_PASSWORD }}
passphrase: ${{ secrets.HYP_BOT_GPG_PASSWORD }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true
Expand Down
2 changes: 2 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ branches:
- name: "main"
- name: "release/*"
prerelease: "snapshot"
- name: "beta"
prerelease: true

plugins:
- "@semantic-release/commit-analyzer"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ You should be able to import and build the project in IntelliJ IDEA now.
Here is a list of common issues you might face and its solutions.
##### Enviroment Variables were added but not available
##### Environment Variables were added but not available
If you already added the envorment variable to your CMD profile and still not being available.
If you already added the environment variable to your CMD profile and still not being available.
**Solution**
Expand Down
191 changes: 91 additions & 100 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
id("maven-publish")
id("org.jetbrains.kotlinx.kover") version "0.7.5"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0-rc-1"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("signing")
id("com.android.library") version "8.1.4" apply false
}
Expand Down Expand Up @@ -35,111 +35,102 @@ allprojects {
apply(plugin = "org.gradle.maven-publish")
apply(plugin = "org.gradle.signing")

// Allowed projects to publish to maven
val allowedProjectsToPublish = listOf("apollo")
if (allowedProjectsToPublish.contains(project.name) && project.name.contains("androidDebug")) {
publishing {
repositories {
maven {
name = "OSSRH"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.findProperty("sonatypeUsername") as String? ?: System.getenv("OSSRH_USERNAME")
password = project.findProperty("sonatypePassword") as String? ?: System.getenv("OSSRH_TOKEN")
publishing {
publications.withType<MavenPublication> {
groupId = publishedMavenId
artifactId = project.name
version = project.version.toString()
pom {
name.set("Identus Apollo")
description.set("Collection of the cryptographic methods used all around Identus platform")
url.set("https://docs.atalaprism.io/")
organization {
name.set("Hyperledger")
url.set("https://www.hyperledger.org/")
}
issueManagement {
system.set("Github")
url.set("https://github.com/hyperledger/identus-apollo")
}
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
}
publications {
withType<MavenPublication> {
groupId = publishedMavenId
artifactId = project.name
version = project.version.toString()
pom {
name.set("Identus Apollo")
description.set("Collection of the cryptographic methods used all around Identus platform")
url.set("https://docs.atalaprism.io/")
organization {
name.set("IOG")
url.set("https://iog.io/")
}
issueManagement {
system.set("Github")
url.set("https://github.com/hyperledger/identus-apollo")
}
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("hamada147")
name.set("Ahmed Moussa")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
url.set("https://github.com/hamada147")
}
developer {
id.set("amagyar-iohk")
name.set("Allain Magyar")
email.set("[email protected]")
organization.set("IOG")
roles.add("qc")
}
developer {
id.set("antonbaliasnikov")
name.set("Anton Baliasnikov")
email.set("[email protected]")
organization.set("IOG")
roles.add("qc")
}
developer {
id.set("elribonazo")
name.set("Javier Ribó")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("goncalo-frade-iohk")
name.set("Gonçalo Frade")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("curtis-h")
name.set("Curtis Harding")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("cristianIOHK")
name.set("Cristian Gonzalez")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
}
scm {
connection.set("scm:git:git://[email protected]/hyperledger/identus-apollo.git")
developerConnection.set("scm:git:ssh://[email protected]/hyperledger/identus-apollo.git")
url.set("https://github.com/hyperledger/identus-apollo")
}
developers {
developer {
id.set("hamada147")
name.set("Ahmed Moussa")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
url.set("https://github.com/hamada147")
}

signing {
useInMemoryPgpKeys(
project.findProperty("signing.signingSecretKey") as String? ?: System.getenv("OSSRH_GPG_SECRET_KEY"),
project.findProperty("signing.signingSecretKeyPassword") as String? ?: System.getenv("OSSRH_GPG_SECRET_KEY_PASSWORD")
)
sign(this@withType)
developer {
id.set("amagyar-iohk")
name.set("Allain Magyar")
email.set("[email protected]")
organization.set("IOG")
roles.add("qc")
}
developer {
id.set("antonbaliasnikov")
name.set("Anton Baliasnikov")
email.set("[email protected]")
organization.set("IOG")
roles.add("qc")
}
developer {
id.set("elribonazo")
name.set("Javier Ribó")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("goncalo-frade-iohk")
name.set("Gonçalo Frade")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("curtis-h")
name.set("Curtis Harding")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("cristianIOHK")
name.set("Cristian Gonzalez")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("yshyn-iohk")
name.set("Yurii Shynbuiev")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
}
scm {
connection.set("scm:git:git://[email protected]/hyperledger/identus-apollo.git")
developerConnection.set("scm:git:ssh://[email protected]/hyperledger/identus-apollo.git")
url.set("https://github.com/hyperledger/identus-apollo")
}
}

signing {
useInMemoryPgpKeys(
project.findProperty("signing.signingSecretKey") as String? ?: System.getenv("OSSRH_GPG_SECRET_KEY"),
project.findProperty("signing.signingSecretKeyPassword") as String? ?: System.getenv("OSSRH_GPG_SECRET_KEY_PASSWORD")
)
sign(this@withType)
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"gradle-semantic-release-plugin": "1.7.7",
"semantic-release": "^21.0.2",
"gradle-semantic-release-plugin": "1.9.2",
"semantic-release": "^24.0.0",
"semantic-release-slack-bot": "^4.0.2"
}
}

0 comments on commit 8f98b5a

Please sign in to comment.