Skip to content

Commit

Permalink
Prepare 2.2.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
05nelsonm committed Aug 30, 2024
1 parent f3a611c commit 38ce433
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 245 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CHANGELOG

## Version 2.2.2 (2024-08-30)
- Updates dependencies
- Kotlin `1.9.23` -> `1.9.24`
- Fixes multiplatform metadata manifest `unique_name` parameter for
all source sets to be truly unique. [[#147]][147]
- Updates jvm `.kotlin_module` with truly unique file name. [[#147]][147]
- Fixes Java9 JPMS `module-info` to use `transitive` instead of just
`requires`. [[#150]][150]

## Version 2.2.1 (2024-03-13)
- Adds support for `wasmJs.browser` [[#144]][144]

Expand Down Expand Up @@ -185,4 +194,6 @@
[140]: https://github.com/05nelsonm/encoding/pull/140
[142]: https://github.com/05nelsonm/encoding/pull/142
[144]: https://github.com/05nelsonm/encoding/pull/144
[147]: https://github.com/05nelsonm/encoding/pull/147
[150]: https://github.com/05nelsonm/encoding/pull/150
[MIGRATION]: https://github.com/05nelsonm/encoding/blob/master/MIGRATION.md
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ See [sample project](sample/README.md)
```kotlin
// build.gradle.kts
dependencies {
val encoding = "2.2.1"
val encoding = "2.2.2"
implementation("io.matthewnelson.encoding:base16:$encoding")
implementation("io.matthewnelson.encoding:base32:$encoding")
implementation("io.matthewnelson.encoding:base64:$encoding")
Expand All @@ -295,7 +295,7 @@ Alternatively, you can use the BOM.
// build.gradle.kts
dependencies {
// define the BOM and its version
implementation(platform("io.matthewnelson.encoding:bom:2.2.1"))
implementation(platform("io.matthewnelson.encoding:bom:2.2.2"))

// define artifacts without version
implementation("io.matthewnelson.encoding:base16")
Expand All @@ -308,11 +308,11 @@ dependencies {
```

<!-- TAG_VERSION -->
[badge-latest-release]: https://img.shields.io/badge/latest--release-2.2.1-blue.svg?style=flat
[badge-latest-release]: https://img.shields.io/badge/latest--release-2.2.2-blue.svg?style=flat
[badge-license]: https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat

<!-- TAG_DEPENDENCIES -->
[badge-kotlin]: https://img.shields.io/badge/kotlin-1.9.23-blue.svg?logo=kotlin
[badge-kotlin]: https://img.shields.io/badge/kotlin-1.9.24-blue.svg?logo=kotlin

<!-- TAG_PLATFORMS -->
[badge-platform-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat
Expand Down
242 changes: 2 additions & 240 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,243 +1,5 @@
# Releasing

### Linux
See [KotlinCrypto/documentation/RELEASING.md][url-kotlincrypto-releasing]

- Ensure java version is greater than or equal to 11
```bash
java --version
```

- Set version variable in terminal shell
```bash
VERSION_NAME="<version name>"
```

- Create a release branch
```bash
git checkout master
git pull
git checkout -b release_"$VERSION_NAME"
```

- Update `VERSION_NAME` (remove `-SNAPSHOT`) and `VERSION_CODE` in root project's `gradle.properties` file

- Update `version` in project's `README.md` documentation

- Update `CHANGELOG.md`

- Commit Changes
```bash
git add --all
git commit -S -m "Prepare $VERSION_NAME release"
git tag -s "$VERSION_NAME" -m "Release v$VERSION_NAME"
```

- Make sure you have valid credentials in `~/.gradle/gradle.properties`
```
mavenCentralUsername=MyUserName
mavenCentralPassword=MyPassword
```

- Make sure you have GPG gradle config setup in `~/.gradle/gradle.properties` for signing
```
signing.gnupg.executable=gpg
signing.gnupg.useLegacyGpg=true
signing.gnupg.homeDir=/path/to/.gnupg/
signing.gnupg.optionsFile=/path/to/.gnupg/gpg.conf
signing.gnupg.keyName=0x61471B8AB3890961
```

- Make sure GPG is picking up YubiKey to sign releases
```bash
gpg --card-status
```

- Disable YubiKey touch for signing
```bash
ykman openpgp keys set-touch sig off
```

- Perform a clean build
```bash
./gradlew clean -DKMP_TARGETS_ALL
./gradlew build -DKMP_TARGETS_ALL
```

- Publish
```bash
./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel -DKMP_TARGETS_ALL
```

- Push release branch to repo (to publish from macOS)
```bash
git push -u origin release_"$VERSION_NAME"
```

### macOS

- Spin up VM of macOS and ensure USB pass through worked for the YubiKey
- Should ask for PIN to log in

- Sign a random `.txt` file (gpg tty for YubiKey PIN + gradle build don't mix)
```shell
gpg --sign --armor --detach ~/Documents/hello.txt
```

- Ensure java version is greater than or equal to 11
```shell
java --version
```

- Ensure you are in a `bash` shell
```shell
bash
```

- Set version variable in terminal shell
```bash
VERSION_NAME="<version name>"
```

- Pull the latest code from release branch
```bash
git checkout master
git pull
git checkout release_"$VERSION_NAME"
```

- Make sure you have valid credentials in `~/.gradle/gradle.properties`
```
mavenCentralUsername=MyUserName
mavenCentralPassword=MyPassword
```

- Make sure you have GPG gradle config setup in `~/.gradle/gradle.properties` for signing
```
signing.gnupg.executable=gpg
signing.gnupg.useLegacyGpg=true
signing.gnupg.homeDir=/path/to/.gnupg/
signing.gnupg.optionsFile=/path/to/.gnupg/gpg.conf
signing.gnupg.keyName=0x61471B8AB3890961
```

- Perform a clean build
```bash
MACOS_TARGETS="JVM,JS,IOS_ARM64,IOS_X64,IOS_SIMULATOR_ARM64,MACOS_ARM64,MACOS_X64,TVOS_ARM64,TVOS_X64,TVOS_SIMULATOR_ARM64,WATCHOS_ARM32,WATCHOS_ARM64,WATCHOS_DEVICE_ARM64,WATCHOS_X64,WATCHOS_SIMULATOR_ARM64,WASM_JS,WASM_WASI"
./gradlew clean -PKMP_TARGETS="$MACOS_TARGETS"
./gradlew build -PKMP_TARGETS="$MACOS_TARGETS"
```

- Publish macOS build
```bash
PUBLISH_TASKS=$(./gradlew tasks -PKMP_TARGETS="$MACOS_TARGETS" |
grep "ToMavenCentralRepository" |
cut -d ' ' -f 1 |
grep -e "publishIos" -e "publishMacos" -e "publishTvos" -e "publishWatchos"
)
./gradlew $PUBLISH_TASKS --no-daemon --no-parallel -PKMP_TARGETS="$MACOS_TARGETS"
```

### Linux

- The [gradle-maven-publish-plugin](https://github.com/vanniktech/gradle-maven-publish-plugin) should have automatically
closed the staged repositories, but if it did not:
- Close publications (Don't release yet)
- Login to Sonatype OSS Nexus: [oss.sonatype.org](https://s01.oss.sonatype.org/#stagingRepositories)
- Click on **Staging Repositories**
- Select all Publications
- Click **Close** then **Confirm**
- Wait a bit, hit **Refresh** until the *Status* changes to *Closed*

- Check Publication
```bash
./gradlew clean -PCHECK_PUBLICATION -DKMP_TARGETS_ALL
./gradlew :tools:check-publication:build --refresh-dependencies -PCHECK_PUBLICATION -DKMP_TARGETS_ALL
```

### macOS

- Check Publication
```bash
./gradlew clean -PCHECK_PUBLICATION -DKMP_TARGETS_ALL
./gradlew :tools:check-publication:build --refresh-dependencies -PCHECK_PUBLICATION -DKMP_TARGETS_ALL
```

### Linux

- Re-enable YubiKey touch for signing
```bash
ykman openpgp keys set-touch sig on
```

- **Release** publications from Sonatype OSS Nexus StagingRepositories manager
- Alternatively, can use Curl with the given repository id's that were output
to terminal when publishing, e.g. `iomatthewnelson-1018`
```shell
curl -v -u "<USER NAME>" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
https://s01.oss.sonatype.org/service/local/staging/bulk/promote --data '
{
"data": {
"stagedRepositoryIds": [
"iomatthewnelson-<id>",
"iomatthewnelson-<id>"
],
"autoDropAfterRelease": true
}
}'
```

- Merge release branch to `master`
```bash
git checkout master
git pull
git merge --no-ff -S release_"$VERSION_NAME"
```

- Update `VERSION_NAME` (add `-SNAPSHOT`) and `VERSION_CODE` in root project's `gradle.properties` file
- Commit changes
```bash
git add --all
git commit -S -m "Prepare for next development iteration"
```
- Push Changes
```bash
git push
```
- Push Tag
```bash
git push origin "$VERSION_NAME"
```
- Delete release branch on GitHub
- Delete local release branch
```bash
git branch -D release_"$VERSION_NAME"
```
### Macos
- Checkout master
```bash
git checkout master
git pull
```
- Delete local release branch
```bash
git branch -D release_"$VERSION_NAME"
```
- Shutdown VMs (if not needed anymore)
### Linux
- Wait for releases to become available on [MavenCentral](https://repo1.maven.org/maven2/io/matthewnelson/encoding/)
- Draft new release on GitHub
- Enter the release name <VersionName> as tag and title
- Have the description point to the changelog
[url-kotlincrypto-releasing]: https://github.com/KotlinCrypto/documentation/blob/master/RELEASING.md
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ POM_DEVELOPER_ID=05nelsonm
POM_DEVELOPER_NAME=Matthew Nelson
POM_DEVELOPER_URL=https://github.com/05nelsonm/

VERSION_NAME=2.2.2-SNAPSHOT
VERSION_NAME=2.2.2
# 0.1.0-alpha01 = 00 01 00 11
# 0.1.0-beta01 = 00 01 00 21
# 0.1.0-rc01 = 00 01 00 31
Expand Down

0 comments on commit 38ce433

Please sign in to comment.