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

Release 0.4.0 #38

Merged
merged 13 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
# https://docs.gradle.org/current/userguide/signing_plugin.html#sec:in-memory-keys
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_GPG_ARMORED_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVEN_GPG_PASSWORD }}
run: gradle publish
run: gradle publishToSonatype closeAndReleaseSonatypeStagingRepository
shell: bash

deploy-dev-maven:
Expand Down
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@ buildscript {
}
}

plugins {
id "io.github.gradle-nexus.publish-plugin" version "${gradleNexusPublish}"
}

// considers the same properties as for publishing:
// - ORG_GRADLE_PROJECT_mavenOSSRHUsername
// - ORG_GRADLE_PROJECT_mavenOSSRHPassword
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
// stagingProfileId = this.properties['mavenOSSRHStagingProfileId']
username = this.properties['mavenOSSRHUsername']
password = this.properties['mavenOSSRHPassword']
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
40 changes: 40 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Release

Assumptions:

* `main` branch can wait until release PR is merged

The steps:

1. **release**:
1. **review and adjust (if needed) the release version in `main`** to match the changes from the latest release following the [SemVer rules](https://semver.org/#summary)
2. [create](https://github.com/sicpa-dlab/peer-did-jvm/compare/stable...main) a **PR from `main` to `stable`** (you may likely want to name it as `release-<version>`)
3. once merged [release pipeline](https://github.com/sicpa-dlab/peer-did-jvm/actions/workflows/release.yml) will publish the release to [Maven Central](https://s01.oss.sonatype.org/content/repositories/releases/org/didcommx/peerdid/)
2. **bump next release version in `main`**:
* **Note** decision about the next release version should be based on the same [SemVer](https://semver.org/) rules and the expected changes. Usually it would be either a MINOR or MAJOR (if incompatible changes are planned) release.

## Specific cases

### Manual Maven releases

If by some reason you need to publish releases to Sonatype manually you need:

* define the environment variables:
* `ORG_GRADLE_PROJECT_mavenOSSRHUsername` and `ORG_GRADLE_PROJECT_mavenOSSRHPassword`: [Sonatype Nexus](https://s01.oss.sonatype.org) username and token generated pair
* `ORG_GRADLE_PROJECT_signingKey`: ascii armored private part of a GPG key used for signing (please refer [Sonatype docs](https://central.sonatype.org/publish/requirements/gpg/) for the details)
* `ORG_GRADLE_PROJECT_signingPassword`: passphrase for the key above
* release commands:
* fully automated release:

```bash
$ ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
```
* two-step release:

* publish to Nexus

```bash
$ ./gradlew publishToSonatype
```

* go to [Nexus staging repositories](https://oss.sonatype.org/#stagingRepositories) and do `Close` and `Release` as described in [Sonatype docs](https://help.sonatype.com/repomanager2/staging-releases/managing-staging-repositories)
7 changes: 5 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Project-wide Gradle settings.

version=0.3.0
version=0.4.0
group=org.didcommx

# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

kotlinJvm=1.5.21
kotlinJvm=1.7.20
jvmTarget=1.8
ktlintGradle=10.1.0

Expand All @@ -17,6 +18,8 @@ mannodermausJUunit5AndroidTest=1.3.0
googleGson=2.8.8
javaMultibase=v1.1.0
johnrengelmanShadow=7.0.0
gradleNexusPublish=1.1.0
champeauJMH=0.6.6
zmanVarint=1.0.0

# Android settigns
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading