Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
tonisives committed Nov 29, 2023
1 parent 45b4d3d commit ffcad91
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Update version

on:
pull_request:
types:
- closed
branches:
- main
# disabled until we don't support v0 and v1 anymore. Read more: `./gradle/deploy-process.md`
# pull_request:
# types:
# - closed
# branches:
# - main

jobs:
create-new-tag:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This is the changelog for v2 releases. See v0/v1 releases in appropriate branches.

## [2.0.1] - 2023-11-29

### Added

- Porsche, Maserati and Kia brands

## [2.0.0] - 2023-16-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=2.0.0
version=2.0.1
kotlin.code.style=official
27 changes: 14 additions & 13 deletions gradle/deploy-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@

Release is done via a merged pull request to main/v0/v1 and then creating a release in GitHub UI.

## Steps for v2
- update CHANGELOG.md
- next version is with minor +1, or the manually updated version
- merge a pull request to main. This creates a new tag with minor +=1.
- optionally set a new major/minor version in `gradle.properties` before merging. Then the tag is created according to this manual version. Otherwise, patch number is incremented automatically.
- create a release from this tag in GitHub. Use `Generate release notes`
- Action starts that pushes the package to MavenCentral.
- You can check OSSRH whether release was successful or not.

## Steps for v0 and v1
## Steps for v0, v1 and v2

- update CHANGELOG.md
- update the version in `gradle.properties`. Needs to be done manually because the new tag task works for main branch only.
- merge the PR to the `v0`/`v1` branch
- update the version in `gradle.properties`
- merge the PR to the `v0`/`v1`/`main` branch
- Create release tag manually
- Create a release from this tag
- Action starts that pushes the package to MavenCentral.
- You can check OSSRH whether release was successful or not.

❗Release the v0 and v1 first if releasing all versions. This way the v2 is the latest in the Releases changelog.

## Make a test release locally to staging

- comment out line `useInMemoryPgpKeys(signingKey, signingPassword)` in deploy-ossrh.gradle
- Update version in `$projectRoot/gradle.properties` and call `./gradlew -Prelease :hmkit-fleet:publishToSonatype`.
- Don't merge test version names to main
- Don't merge test version names to main


## Automatic version increment

It is possible to increment version on a PR, but the plugin currently works for main branch only. We want to release all versions with the same process, so we do it as described in the above paragraph. Otherwise, version incrementing works like this:

- merge a pull request to main. This creates a new tag with minor +=1.
- optionally set a new major/minor version in `gradle.properties` before merging. Then the tag is created according to this manual version. Otherwise, patch number is incremented automatically.

0 comments on commit ffcad91

Please sign in to comment.