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

Update workflow to create a CLI release tag #1101

Merged
merged 6 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}
- id: create-tag
run: ./etc/scripts/release.sh create_tag >> "${GITHUB_OUTPUT}"
create-cli-tag:
if: ${{ startsWith(github.ref_name, 'release-cli') }}
needs: create-tag
tvallin marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-20.04
environment: release
outputs:
cli-tag: ${{ steps.create-cli-tag.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.SERVICE_ACCOUNT_TOKEN }}
- uses: ./.github/actions/common
with:
run: |
version=$(echo '${{ needs.create-tag.outputs.tag }}' | cut -d '/' -f 3)
cli_tag="cli/${version}"
git tag -f "${cli_tag}"
git push --force origin refs/tags/"${cli_tag}":refs/tags/"${cli_tag}"
validate:
needs: create-tag
uses: ./.github/workflows/validate.yml
Expand Down
13 changes: 9 additions & 4 deletions etc/CLI_RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
## CLI release checklist
# CLI release checklist

This documentation aims to describe the steps to release the Helidon CLI.

# SDKMan
## Create CLI release tag

Push a new branch `release-cli-*` to make a usual release and then create a specific cli release tag with this
shape `cli/${version}`.

## SDKMan

Helidon team possesses credentials to access `SDKMan` REST API to do the following actions:

Expand Down Expand Up @@ -50,11 +55,11 @@ curl -X POST \
https://vendors.sdkman.io/announce/struct
```

# HomeBrew
## HomeBrew

Update the `HomeBrew` formula from `homebrew/homebrew-core` to release a new Helidon CLI version.

## Useful links
# Useful links

* SDKMan: https://sdkman.io/vendors
* HomeBrew: https://docs.brew.sh/
8 changes: 4 additions & 4 deletions etc/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $(basename "${0}") [ --build-number=N ] CMD
Print the release version

create_tag
Create and and push a release tag
Create and push a release tag

release_build
Perform a release build
Expand Down Expand Up @@ -107,7 +107,7 @@ readonly WS_DIR
# this allows us to use fd 6 for returning data
exec 6>&1 1>&2

current_version() {
current_version(){
# shellcheck disable=SC2086
mvn ${MVN_ARGS} -q \
-f "${WS_DIR}"/pom.xml \
Expand All @@ -117,7 +117,7 @@ current_version() {
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec
}

release_version() {
release_version(){
local current_version
current_version=$(current_version)
echo "${current_version%-*}"
Expand All @@ -142,7 +142,7 @@ update_version(){
-DupdateMatchingVersions="false"
}

create_tag() {
create_tag(){
local git_branch version

version=$(release_version)
Expand Down
Loading