Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: publish to OSSHR repository #188

Merged
merged 20 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
dc8fd38
feat: add a beta branch and rust-init installer to the release flow
yshyn-iohk Aug 2, 2024
65972ac
chore(release): cut apollo version 1.4.0-beta.1 # [1.4.0-beta.1](http…
hyperledger-bot Aug 2, 2024
4ad87a6
chore: add --debug to the semantic-release
yshyn-iohk Aug 2, 2024
c730bf2
Merge remote-tracking branch 'origin/beta' into beta
yshyn-iohk Aug 2, 2024
b85edb7
feat: add --info to the CI
yshyn-iohk Aug 5, 2024
23e5be8
feat: rollback oss.sonatype url and upgrade a gradle-release-plugin t…
yshyn-iohk Aug 5, 2024
f86c4a2
chore(release): cut apollo version 1.4.0-beta.2 # [1.4.0-beta.2](http…
hyperledger-bot Aug 5, 2024
8dbd048
feat: add --info to the CI
yshyn-iohk Aug 6, 2024
1fa8205
feat: add --info to the CI
yshyn-iohk Aug 6, 2024
7a23cc9
Merge remote-tracking branch 'origin/beta' into beta
yshyn-iohk Aug 6, 2024
56824ec
feat: replace maven section with nexusPublishing
yshyn-iohk Aug 6, 2024
b9c27e7
chore(release): cut apollo version 1.4.0-beta.3 # [1.4.0-beta.3](http…
hyperledger-bot Aug 6, 2024
2e1ee7d
feat: publish update
yshyn-iohk Aug 6, 2024
31f0161
feat: update the publishing info
yshyn-iohk Aug 6, 2024
9303d4c
Merge remote-tracking branch 'origin/beta' into beta
yshyn-iohk Aug 6, 2024
9d06272
chore(release): cut apollo version 1.4.0-beta.4 # [1.4.0-beta.4](http…
hyperledger-bot Aug 6, 2024
223fb03
Merge remote-tracking branch 'refs/remotes/origin/main' into beta
yshyn-iohk Aug 7, 2024
06e7e89
feat: cleanup the branch and prepare for PR
yshyn-iohk Aug 7, 2024
460c07d
chore: fix build.gradle.kts file after merging
yshyn-iohk Aug 7, 2024
e656c53
fix: formatting in the build.gradle.kts file
yshyn-iohk Aug 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait
why this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for asking.
For some reason, the release flow fails at the Post Install Task
For instance, here: https://github.com/hyperledger/identus-apollo/actions/runs/10279883067
The entire release fails even if the packages are published and the chore commit is pushed.

I could not find a solution for this now except to add continue-on-error to the Post Install Java 17 task.

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#189 for tracking

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"
}
}
Loading