@@ -83,6 +83,9 @@ rc_hash="$(git rev-list --max-count=1 "${rc_tag}")"
8383id=" apache-arrow-java-${version} "
8484tar_gz=" ${id} .tar.gz"
8585
86+ artifacts_dir=" apache-arrow-java-${version} -rc${rc} "
87+ signed_artifacts_dir=" ${artifacts_dir} -signed"
88+
8689if [ " ${RELEASE_SIGN} " -gt 0 ]; then
8790 git_origin_url=" $( git remote get-url origin) "
8891 repository=" ${git_origin_url#* github.com?} "
@@ -105,23 +108,34 @@ if [ "${RELEASE_SIGN}" -gt 0 ]; then
105108 echo " Found GitHub Actions workflow with ID: ${run_id} "
106109 gh run watch --repo " ${repository} " --exit-status " ${run_id} "
107110
108- echo " Downloading .tar.gz from GitHub Releases"
111+ echo " Downloading artifacts from GitHub Releases"
109112 gh release download " ${rc_tag} " \
110- --dir . \
111- --pattern " ${tar_gz} " \
113+ --dir " ${artifacts_dir} " \
112114 --repo " ${repository} " \
113115 --skip-existing
114116
115- echo " Signing tar.gz and creating checksums"
116- gpg --armor --output " ${tar_gz} .asc" --detach-sig " ${tar_gz} "
117+ echo " Signing artifacts"
118+ rm -rf " ${signed_artifacts_dir} "
119+ mkdir -p " ${signed_artifacts_dir} "
120+ for artifact in ${artifacts_dir} /* ; do
121+ case " ${artifact} " in
122+ * .asc | * .sha256 | * .sha512)
123+ continue
124+ ;;
125+ esac
126+ gpg --armor \
127+ --detach-sig \
128+ --output " ${signed_artifacts_dir} /$( basename " ${artifact} " ) .asc" \
129+ " ${artifact} "
130+ done
117131fi
118132
119133if [ " ${RELEASE_UPLOAD} " -gt 0 ]; then
120134 echo " Uploading signature"
121135 gh release upload " ${rc_tag} " \
122136 --clobber \
123- --repo " ${repository} " \
124- " ${tar_gz} .asc"
137+ --repo " ${repository:- kou / arrow-java } " \
138+ ${signed_artifacts_dir} / * .asc
125139fi
126140
127141echo " Draft email for dev@arrow.apache.org mailing list"
0 commit comments