Skip to content

[AMORO-3770] Improve the release procedure#4106

Draft
majin1102 wants to merge 3 commits intoapache:masterfrom
majin1102:improve-release-process-3770
Draft

[AMORO-3770] Improve the release procedure#4106
majin1102 wants to merge 3 commits intoapache:masterfrom
majin1102:improve-release-process-3770

Conversation

@majin1102
Copy link
Contributor

@majin1102 majin1102 commented Mar 5, 2026

What changes were proposed in this pull request?

This PR improves the release procedure based on feedback from 0.8.1-incubating release voting, addressing issue #3770.

Changes:

  1. Exclude AppleDouble files from source tarball

    • Add --exclude '._*' and --exclude '*/._*' to rsync command
    • These macOS metadata files should not be in Apache releases
  2. Include pre-generated git.properties in source tarball

    • Generate git.properties before excluding .git directory
    • Copy the file to tarball since target/ is excluded
    • This ensures version info is available when building from source
  3. Build binary releases from source tarball for reproducibility

    • create_binary_release.sh now requires source tarball to exist first
    • Extracts and builds from the source tarball
    • Ensures binary releases match the source release (critical for Apache releases)
  4. Update release guide

    • Correct build order: source release first, then binary release
    • Add verification steps for checking AppleDouble files and git.properties
  5. Add GitHub Actions workflow for release automation

    • New .github/workflows/release.yml for manual release builds
    • Support skip_gpg and skip_deploy parameters for testing
    • Update create_source_release.sh to support SKIP_GPG env variable

How was this patch tested?

  • Bash syntax validation: bash -n for both scripts
  • Logic review to ensure git.properties is properly included in tarball
  • GitHub Actions workflow can be tested with skip_gpg=true and skip_deploy=true

Release process change

Before: Build order didn't matter (scripts were independent)

After: Must build source release first, then binary release (binary depends on source tarball)

# Correct order:
RELEASE_VERSION=x.x.x bash ./releasing/create_source_release.sh   # First
RELEASE_VERSION=x.x.x bash ./releasing/create_binary_release.sh   # Second

GitHub Actions Release Workflow

Usage

  1. Go to ActionsRelease Build
  2. Click Run workflow
  3. Enter parameters:
    • release_version: Release version (e.g., 0.9.0)
    • skip_gpg: Skip GPG signing (for testing)
    • skip_deploy: Skip Maven deploy (for testing)
  4. Download artifacts after completion

Testing (without actual release)

To test the workflow without triggering an actual release:

  • Set skip_gpg: true - No GPG signing required
  • Set skip_deploy: true - No Maven deployment

This only builds tar.gz files and uploads to GitHub Artifacts, safe for testing in fork repositories.

Required Secrets (for production releases)

Secret Description
GPG_PRIVATE_KEY GPG private key for signing
GPG_PASSPHRASE GPG key passphrase
NEXUS_USER Apache Nexus username
NEXUS_PASSWORD Apache Nexus password

Closes #3770

This PR improves the release procedure based on feedback from 0.8.1-incubating release voting:

1. Exclude AppleDouble files (._*) from source tarball
   - Add --exclude '._*' and --exclude '*/._*' to rsync command
   - These macOS metadata files should not be in Apache releases

2. Include pre-generated git.properties in source tarball
   - Generate git.properties before excluding .git directory
   - Copy the file to tarball since target/ is excluded
   - This ensures version info is available when building from source

3. Build binary releases from source tarball for reproducibility
   - create_binary_release.sh now requires source tarball to exist
   - Extracts and builds from the source tarball
   - Ensures binary releases match the source release

4. Update release guide with correct build order and verification steps
majin.nathan added 2 commits March 5, 2026 21:14
- Add release.yml workflow for manual release builds
- Support skip_gpg and skip_deploy parameters for testing
- Update create_source_release.sh to support SKIP_GPG env variable
- Remove manual build commands (now handled by GitHub Actions)
- Add GitHub Actions workflow usage instructions
- Add secrets configuration requirements
- Simplify the build release section
@zhoujinsong
Copy link
Contributor

zhoujinsong commented Mar 9, 2026

Thanks for the improvements! The changes address real Apache release compliance issues.

A few things to fix/clarify:

1. CURR_DIR is undefined in create_binary_release.sh

cd ${CURR_DIR}  # CURR_DIR is never assigned
rm -rf ${EXTRACT_DIR}

This will cause cd to fail or behave unexpectedly. Please add CURR_DIR=$(pwd) near the top of the script.

2. Missing newline at end of file
Both create_source_release.sh and create_binary_release.sh are missing a trailing newline. POSIX requires text files to end with a newline.

3. git.properties copy should fail fast if file is missing

cp amoro-ams/target/classes/amoro/git.properties amoro-$RELEASE_VERSION/amoro-ams/target/classes/amoro/

If the mvn initialize step fails silently or the output path changes, this cp will fail with a confusing error. Consider adding an explicit check:

[ -f amoro-ams/target/classes/amoro/git.properties ] || { echo "ERROR: git.properties not generated"; exit 1; }

4. Verification request
Could you run the GitHub Actions workflow on your fork with skip_gpg=true and skip_deploy=true to verify the end-to-end flow works? Please share the Actions run link in this PR.

@majin1102
Copy link
Contributor Author

Sorry, I don't have the time to verify this carefully. Give me some time

@majin1102 majin1102 marked this pull request as draft March 9, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Improve the release procedure

2 participants