Skip to content

Commit ac77f5b

Browse files
committed
Use dev/release/04-binary-download.sh to download the release candidate MLTBX file
1 parent 2fb2d55 commit ac77f5b

File tree

1 file changed

+24
-30
lines changed

1 file changed

+24
-30
lines changed

.github/workflows/package.yml

+24-30
Original file line numberDiff line numberDiff line change
@@ -35,52 +35,46 @@ jobs:
3535
- name: Update tags
3636
run: |
3737
git fetch --tags --force origin
38-
- name: Store release tag name as environment variable
38+
- name: Store release tag name as an environment variable
3939
run: |
4040
echo "RELEASE_TAG_NAME=${{github.ref_name}}" >> "$GITHUB_ENV"
41-
- name: Prepare Version
41+
- name: Extract version strings
4242
# Extract the version string, version with the release-candidate
43-
# number string, and release-candidate number from the git tag name
44-
# (i.e. RELEASE_TAG_NAME). Store extracted values as environment
45-
# variables in GITHUB_ENV for use in subsequent steps.
43+
# number string, and release-candidate number from the name of
44+
# the git tag. (i.e. RELEASE_TAG_NAME).
4645
run: |
4746
version_with_rc=${RELEASE_TAG_NAME#apache-arrow-}
4847
version=${version_with_rc%-rc*}
49-
rc=${version_with_rc#${version}-rc}
50-
echo "ARROW_VERSION_WITH_RC=$version_with_rc" >> "$GITHUB_ENV"
51-
echo "ARROW_VERSION=$version" >> $GITHUB_ENV
52-
echo "ARROW_RC=$rc" >> $GITHUB_ENV
48+
rc_num=${version_with_rc#${version}-rc}
49+
echo "ARROW_VERSION_WITH_RC=${version_with_rc}" >> "${GITHUB_ENV}"
50+
echo "ARROW_VERSION=${version}" >> ${GITHUB_ENV}
51+
echo "ARROW_RC_NUM=${rc_num}" >> ${GITHUB_ENV}
5352
- name: Extract crossbow job id
54-
# Extract the crossbow job ID from the subject associated with the git
55-
# tag message. Store the extracted ID as an environment variable in
56-
# GITHUB_ENV for use in subsequent steps.
53+
# Extract the crossbow job ID from the subject field of the git tag subject.
5754
run: |
58-
crossbow_job_id=$(git for-each-ref refs/tags/$RELEASE_TAG_NAME --format='%(contents:subject)')
59-
echo "CROSSBOW_JOB_ID=$crossbow_job_id" >> "$GITHUB_ENV"
55+
crossbow_job_id=$(git for-each-ref refs/tags/${RELEASE_TAG_NAME} --format='%(contents:subject)')
56+
echo "CROSSBOW_JOB_ID=${crossbow_job_id}" >> "${GITHUB_ENV}"
6057
- name: Setup Archery
6158
run: |
6259
python3 -m pip install -e dev/archery[crossbow]
6360
- name: Download artifacts
6461
# Download the MLTBX file associated with the crossbow job ID.
65-
# Store the path to the downloaded file as an environment variable
66-
# in GITHUB_ENV for use in subsequent steps.
6762
run: |
68-
archery crossbow download-artifacts -f matlab -t release-artifacts $CROSSBOW_JOB_ID
69-
basefilename=$(find release-artifacts/$CROSSBOW_JOB_ID -name '*.mltbx' -type f | xargs basename)
70-
mltbx_file=release-artifacts/$CROSSBOW_JOB_ID/$basefilename
71-
echo "ARROW_MLTBX_FILE=$mltbx_file" >> $GITHUB_ENV
63+
./dev/release/04-binary-download.sh ${ARROW_VERSION} ${ARROW_RC_NUM} --task-filter matlab
64+
base_filename=$(find packages/${CROSSBOW_JOB_ID} -name '*.mltbx' -type f | xargs basename)
65+
mltbx_file=packages/$CROSSBOW_JOB_ID/${base_filename}
66+
echo "ARROW_MLTBX_FILE=${mltbx_file}" >> $GITHUB_ENV
7267
- name: Cut Pre-Release
7368
run: |
74-
target_branch=release-$ARROW_VERSION_WITH_RC
75-
title="Apache Arrow $ARROW_VERSION RC$ARROW_RC"
69+
target_branch=release-${ARROW_VERSION_WITH_RC}
70+
title="Apache Arrow ${ARROW_VERSION} RC${ARROW_RC_NUM}"
7671
repository=${{github.repository}}
77-
release_notes="Release Candidate: $ARROW_VERSION RC$ARROW_RC"
72+
release_notes="Release Candidate: ${ARROW_VERSION} RC${ARROW_RC_NUM}"
7873
gh release create \
79-
$RELEASE_TAG_NAME \
80-
$ARROW_MLTBX_FILE \
74+
${RELEASE_TAG_NAME} \
75+
${ARROW_MLTBX_FILE} \
8176
--prerelease \
82-
--target $target_branch \
83-
--notes "$release_notes" \
84-
--title "$title" \
85-
--repo $repository
86-
77+
--target ${target_branch} \
78+
--notes "${release_notes}" \
79+
--title "${title}" \
80+
--repo ${repository}

0 commit comments

Comments
 (0)