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

Add SDKMan and HomeBrew release process documentation #1093

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
66 changes: 66 additions & 0 deletions cli/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Helidon CLI Release

The CLI is currently released to `HomeBrew` and `SDKMan!`. This document explain the steps to release a new version.

## HomeBrew

HomeBrew Core has a Helidon Formula to allow every user to easily install the CLI. To release a new version,
update the `url` configuration key to the new version. The Formula has some basic testing to make sure the CLI can generate
project. Nevertheless, for more test coverage, it is possible to test the updated Formula locally. Update the formula in
your local Homebrew (`homebrew/Library/Taps/homebrew/homebrew-core/h/helidon.rb`) and use this command:

```shell
export HOMEBREW_NO_INSTALL_FROM_API=1
brew install --build-from-source --verbose helidon
```

Formula: https://github.com/Homebrew/homebrew-core/blame/master/Formula/h/helidon.rb

## SDKMan!

Use SDKMan REST endpoint to publish the new released binaries with our credentials available in the Vault.

1. Release a new candidate

```shell
curl -X POST \
-H "Consumer-Key: CONSUMER_KEY" \
-H "Consumer-Token: CONSUMER_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"candidate": "helidon", "version": "${version}", "url": "https://github.com/helidon-io/helidon-build-tools/releases/download/${version}/helidon-cli.zip"}' \
https://vendors.sdkman.io/release
```
The release endpoint support `POST` and `DELETE` HTTP methods. Releasing a new candidate does not make it the default
version. It is considered a minor release, setting the new candidate as a default version is major release.

2. Set existing Version as Default for Candidate (Optional)

Use the following command to set a version as default.

```shell
curl -X PUT \
-H "Consumer-Key: CONSUMER_KEY" \
-H "Consumer-Token: CONSUMER_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"candidate": "helidon", "version": "${version}"}' \
https://vendors.sdkman.io/default
```

3. Broadcast a Structured Message (Optional)

Announce the new release through SDKMan social media (X feed) and broadcast channel of SDKMAN! CLI.

```shell
curl -X POST \
-H "Consumer-Key: CONSUMER_KEY" \
-H "Consumer-Token: CONSUMER_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"candidate": "helidon", "version": "${version}", "url": "https://helidon.io"}' \
https://vendors.sdkman.io/announce/struct
```
`url`: display the url where user can find the binaries (or any other useful information).
The broadcast message looks like this `helidon ${version} available for download. https://helidon.io`