4444 # Use a token with write permissions
4545 token : ${{ secrets.GITHUB_TOKEN }}
4646
47- - name : Setup test environment
48- uses : ./.github/actions/setup-test-env
49-
5047 - name : Configure Git
5148 run : |
5249 git config --global user.name "github-actions[bot]"
@@ -76,13 +73,19 @@ jobs:
7673 echo "## Parameters" >> $GITHUB_STEP_SUMMARY
7774
7875 # Validate that we're on a release branch
79- if [[ ! "${current_branch}" =~ ^release/(.+)$ ]]; then
76+ if [[ ! "${current_branch}" =~ ^release/([a-z-]+)-( .+)$ ]]; then
8077 echo "❌ Invalid branch: \`${current_branch}\`. This workflow must be run from a release branch (release/major.minor.x)" >> $GITHUB_STEP_SUMMARY
8178 exit 1
8279 fi
8380
84- # Extract version from release branch name
85- branch_version="${BASH_REMATCH[1]}"
81+ # Extract tool name and version from release branch name
82+ tool="${BASH_REMATCH[1]}"
83+ branch_version="${BASH_REMATCH[2]}"
84+
85+ if [[ ! -d "${tool}/releasey" ]]; then
86+ echo "❌ The directory ${tool}/releasey does not exist." >> $GITHUB_STEP_SUMMARY
87+ exit 1
88+ fi
8689
8790 # Validate branch version format and extract components
8891 if ! validate_and_extract_branch_version "${branch_version}"; then
@@ -100,10 +103,11 @@ jobs:
100103 find_next_rc_number "${version_without_rc}"
101104
102105 # Build the new release tag
103- release_tag="apache-polaris-${version_without_rc}-rc${rc_number}"
106+ release_tag="apache-polaris-${tool}-${ version_without_rc}-rc${rc_number}"
104107
105108 # Export all variables for next steps
106109 echo "release_tag=${release_tag}" >> $GITHUB_ENV
110+ echo "tool=${tool}" >> $GITHUB_ENV
107111 echo "major=${major}" >> $GITHUB_ENV
108112 echo "minor=${minor}" >> $GITHUB_ENV
109113 echo "patch=${patch}" >> $GITHUB_ENV
@@ -114,6 +118,7 @@ jobs:
114118 cat <<EOT >> $GITHUB_STEP_SUMMARY
115119 | Parameter | Value |
116120 | --- | --- |
121+ | Tool | \`${tool}\` |
117122 | Release branch | \`${current_branch}\` |
118123 | Version without RC | \`${version_without_rc}\` |
119124 | RC number | \`${rc_number}\` |
@@ -149,16 +154,18 @@ jobs:
149154 run : |
150155 source "${LIBS_DIR}/_version.sh"
151156
152- update_version "${version_without_rc}"
157+ # Call tool-specific version update script
158+ (cd ${tool} ; ./releasey/update_version.sh)
159+
153160 cat <<EOT >> $GITHUB_STEP_SUMMARY
154161 ## Version update
155162 All version files updated to \`${version_without_rc}\`
156163 EOT
157164
158165 - name : Update changelog
159166 run : |
160- source "${LIBS_DIR}/_exec.sh"
161- exec_process ./gradlew patchChangelog
167+ # Call tool-specific update changelog script
168+ (cd ${tool} ; ./releasey/update_changelog.sh)
162169
163170 cat <<EOT >> $GITHUB_STEP_SUMMARY
164171 ## Changelog
@@ -171,11 +178,6 @@ jobs:
171178 source "${LIBS_DIR}/_exec.sh"
172179
173180 # Commit version files and changelog
174- exec_process git add \
175- "$VERSION_FILE" \
176- "$HELM_CHART_YAML_FILE" \
177- "$HELM_README_FILE" \
178- "$CHANGELOG_FILE"
179181 exec_process git commit -m "[chore] Bump version to ${version_without_rc} for release candidate ${rc_number}"
180182
181183 # Push the changes
0 commit comments