From e88358b99ea266be41cfac762549789cc9d85f06 Mon Sep 17 00:00:00 2001 From: Pierre Laporte Date: Mon, 24 Nov 2025 17:03:19 +0100 Subject: [PATCH] Generate release vote e-mail as Github Step Summary (fixes #3079) --- .../release-3-build-and-publish-artifacts.yml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/.github/workflows/release-3-build-and-publish-artifacts.yml b/.github/workflows/release-3-build-and-publish-artifacts.yml index f6d74ac8c1..f3dc4dbb9a 100644 --- a/.github/workflows/release-3-build-and-publish-artifacts.yml +++ b/.github/workflows/release-3-build-and-publish-artifacts.yml @@ -107,6 +107,8 @@ jobs: needs: prerequisite-checks permissions: contents: read + outputs: + staging_repository_url: ${{ steps.publish-nexus.outputs.staging_repository_url }} env: DRY_RUN: ${{ needs.prerequisite-checks.outputs.dry_run }} git_tag: ${{ needs.prerequisite-checks.outputs.git_tag }} @@ -186,6 +188,7 @@ jobs: EOT - name: Publish and close Apache Nexus staging repository + id: publish-nexus env: ORG_GRADLE_PROJECT_apacheUsername: ${{ secrets.APACHE_USERNAME }} ORG_GRADLE_PROJECT_apachePassword: ${{ secrets.APACHE_PASSWORD }} @@ -205,6 +208,9 @@ jobs: staging_repo_url=$(grep "Created staging repository" gradle_publish_output.txt | sed --regexp-extended "s/^Created staging repository .([a-z0-9-]+). at (.*)/\2/") fi + # Set output for other jobs to consume + echo "staging_repository_url=${staging_repo_url}" >> $GITHUB_OUTPUT + cat <> $GITHUB_STEP_SUMMARY ## Nexus Staging Repository Artifacts published and staging repository closed successfully @@ -398,3 +404,85 @@ jobs: | Helm package | ✅ Created and signed | | Apache dist dev repository | ✅ Staged | EOT + + generate-release-email: + name: Generate Release Email Body + runs-on: ubuntu-latest + needs: [prerequisite-checks, build-and-publish-artifacts, build-docker, build-and-stage-helm-chart] + permissions: + contents: read + env: + DRY_RUN: ${{ needs.prerequisite-checks.outputs.dry_run }} + git_tag: ${{ needs.prerequisite-checks.outputs.git_tag }} + version_without_rc: ${{ needs.prerequisite-checks.outputs.version_without_rc }} + rc_number: ${{ needs.prerequisite-checks.outputs.rc_number }} + staging_repository_url: ${{ needs.build-and-publish-artifacts.outputs.staging_repository_url }} + + steps: + - name: Checkout repository + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 + with: + fetch-depth: 0 + + - name: Setup test environment + uses: ./.github/actions/setup-test-env + + - name: Set up environment variables + run: | + echo "RELEASEY_DIR=$(pwd)/releasey" >> $GITHUB_ENV + echo "LIBS_DIR=$(pwd)/releasey/libs" >> $GITHUB_ENV + + - name: Generate release email body + run: | + source "${LIBS_DIR}/_version.sh" + + # Extract staging repository ID from URL + staging_repo_id="" + if [[ -n "${staging_repository_url}" ]]; then + staging_repo_id=$(echo "${staging_repository_url}" | sed -n 's|.*/\(orgapachepolaris-[0-9]*\)/$|\1|p') + fi + + # Get current commit SHA + commit_sha=$(git rev-parse HEAD) + + cat <> $GITHUB_STEP_SUMMARY + # Vote e-mail + + ## Subject + [VOTE] Release Apache Polaris ${version_without_rc} (rc${rc_number}) + + ## Body + Hi everyone, + + I propose that we release the following RC as the official Apache Polaris ${version_without_rc} release. + + This corresponds to the tag: ${git_tag} + * https://github.com/apache/polaris/commits/${git_tag} + * https://github.com/apache/polaris/tree/${commit_sha} + + The release tarball, signature, and checksums are here: + * https://dist.apache.org/repos/dist/dev/incubator/polaris/${version_without_rc} + + Helm charts are available on: + * https://dist.apache.org/repos/dist/dev/incubator/polaris/helm-chart + + NB: you have to build the Docker images locally in order to test Helm charts. + + You can find the KEYS file here: + * https://downloads.apache.org/incubator/polaris/KEYS + + Convenience binary artifacts are staged on Nexus. The Maven repositories URLs are: + * ${staging_repository_url:-"https://repository.apache.org/content/repositories/${staging_repo_id:-""}/"} + + Please download, verify, and test. + + Please vote in the next 72 hours. + + [ ] +1 Release this as Apache polaris ${version_without_rc} + [ ] +0 + [ ] -1 Do not release this because... + + Only PPMC members and mentors have binding votes, but other community members are encouraged to cast non-binding votes. This vote will pass if there are 3 binding +1 votes and more binding +1 votes than -1 votes. + + NB: if this vote passes, a new vote has to be started on the Incubator general mailing list. + EOT