-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ahmed Moussa <[email protected]>
- Loading branch information
Showing
28 changed files
with
666 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
root = true | ||
|
||
[*.{kt,kts}] | ||
ktlint_code_style = ktlint_official | ||
ktlint_standard_no_semi = disabled | ||
ktlint_standard_trailing-comma-on-call-site = disabled | ||
ktlint_standard_trailing-comma-on-declaration-site = disabled | ||
ktlint_standard_function-signature = disabled | ||
ktlint_standard_max-line-length = disabled |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ env: | |
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "*" | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
# kics-scan ignore | ||
name: "Release" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
JAVA_VERSION: 11 | ||
NODEJS_VERSION: 16.17.0 | ||
ATALA_GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }} | ||
ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout the repo" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Validate Gradle Wrapper" | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: "Cache gradle" | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
~/.konan | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: "Install Java ${{ env.JAVA_VERSION }}" | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
distribution: "zulu" | ||
|
||
- uses: crazy-max/ghaction-import-gpg@v5 | ||
id: import_gpg | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
|
||
- name: "Release" | ||
env: | ||
GIT_AUTHOR_EMAIL: ${{ steps.import_gpg.outputs.email }} | ||
GIT_COMMITTER_EMAIL: ${{ steps.import_gpg.outputs.email }} | ||
GIT_AUTHOR_NAME: ${{ steps.import_gpg.outputs.name }} | ||
GIT_COMMITTER_NAME: ${{ steps.import_gpg.outputs.name }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
BASE64_ARMORED_GPG_SIGNING_KEY_MAVEN: ${{ secrets.BASE64_ARMORED_GPG_SIGNING_KEY_MAVEN }} | ||
SIGNING_KEY_PASSWORD: "" | ||
run: | | ||
npm install | ||
npx semantic-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ Pods/ | |
*.jks | ||
*yarn.lock | ||
JSLibs/iohk-crypto/node_modules | ||
node_modules/* | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
branches: | ||
- name: "main" | ||
- name: "release" | ||
- name: "prerelease" | ||
prerelease: "snapshot" | ||
|
||
plugins: | ||
- "@semantic-release/commit-analyzer" | ||
- "@semantic-release/release-notes-generator" | ||
- ["@semantic-release/changelog", {changelogFile: "CHANGELOG.md"}] | ||
- "gradle-semantic-release-plugin" | ||
- [ | ||
"@semantic-release/git", | ||
{ | ||
assets: [ | ||
"CHANGELOG.md", | ||
"gradle.properties" | ||
], | ||
message: "chore(release): cut wallet sdk version ${nextRelease.version} | ||
${nextRelease.notes}", | ||
}, | ||
] | ||
- [ | ||
"semantic-release-slack-bot", | ||
{ | ||
notifyOnSuccess: true, | ||
notifyOnFail: true, | ||
markdownReleaseNotes: true, | ||
onSuccessTemplate: | ||
{text: "A new version of `$package_name` successfully released!\n | ||
Version: `v${nextRelease.version}`\n | ||
Tag: $repo_url/releases/tag/v${nextRelease.version}n | ||
\n | ||
Release notes:\n | ||
$release_notes"}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension | ||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin | ||
import java.util.Base64 | ||
|
||
val publishedMavenId: String = "io.iohk.atala.prism.didcomm" | ||
|
||
plugins { | ||
id("org.jetbrains.dokka") version "1.9.10" | ||
id("maven-publish") | ||
id("signing") | ||
id("io.github.gradle-nexus.publish-plugin") version "2.0.0-rc-1" | ||
id("org.jlleitschuh.gradle.ktlint") version "11.6.1" | ||
} | ||
|
||
buildscript { | ||
|
@@ -13,15 +19,16 @@ buildscript { | |
mavenCentral() | ||
} | ||
dependencies { | ||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20") | ||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22") | ||
classpath("com.android.tools.build:gradle:7.2.2") | ||
classpath("org.jetbrains.dokka:dokka-base:1.9.10") | ||
} | ||
} | ||
|
||
group = publishedMavenId | ||
|
||
allprojects { | ||
version = "1.0.5-alpha" | ||
group = "io.iohk.atala.prism.didcomm" | ||
group = publishedMavenId | ||
|
||
repositories { | ||
google() | ||
|
@@ -35,9 +42,81 @@ allprojects { | |
} | ||
} | ||
|
||
apply(plugin = "org.jlleitschuh.gradle.ktlint") | ||
apply(plugin = "org.gradle.maven-publish") | ||
apply(plugin = "org.gradle.signing") | ||
|
||
publishing { | ||
publications { | ||
withType<MavenPublication> { | ||
groupId = publishedMavenId | ||
artifactId = project.name | ||
version = project.version.toString() | ||
pom { | ||
name.set("Atala PRISM DIDPeer") | ||
description.set("DIDComm V2 & Peer:DID") | ||
url.set("https://docs.atalaprism.io/") | ||
organization { | ||
name.set("IOG") | ||
url.set("https://iog.io/") | ||
} | ||
issueManagement { | ||
system.set("Github") | ||
url.set("https://github.com/input-output-hk/atala-prism-didcomm-kmm") | ||
} | ||
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("elribonazo") | ||
name.set("Javier Ribó") | ||
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://input-output-hk/atala-prism-didcomm-kmm.git") | ||
developerConnection.set("scm:git:ssh://input-output-hk/atala-prism-didcomm-kmm.git") | ||
url.set("https://github.com/input-output-hk/atala-prism-didcomm-kmm") | ||
} | ||
} | ||
signing { | ||
val base64EncodedAsciiArmoredSigningKey: String = | ||
System.getenv("BASE64_ARMORED_GPG_SIGNING_KEY_MAVEN") ?: "" | ||
val signingKeyPassword: String = | ||
System.getenv("SIGNING_KEY_PASSWORD") ?: "" | ||
useInMemoryPgpKeys( | ||
String( | ||
Base64.getDecoder().decode( | ||
base64EncodedAsciiArmoredSigningKey.toByteArray() | ||
) | ||
), | ||
signingKeyPassword | ||
) | ||
sign(this@withType) | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
this.name = "GitHubPackages" | ||
|
@@ -49,8 +128,24 @@ allprojects { | |
} | ||
} | ||
} | ||
|
||
ktlint { | ||
verbose.set(true) | ||
outputToConsole.set(true) | ||
} | ||
} | ||
|
||
rootProject.plugins.withType(NodeJsRootPlugin::class.java) { | ||
rootProject.extensions.getByType(NodeJsRootExtension::class.java).nodeVersion = "16.17.0" | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://oss.sonatype.org/content/repositories/snapshots/")) | ||
username.set(System.getenv("SONATYPE_USERNAME")) | ||
password.set(System.getenv("SONATYPE_PASSWORD")) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.