@@ -38,10 +38,44 @@ permissions:
3838env :
3939 TEST_DEFAULT : " 0"
4040 VERBOSE : " 1"
41- RC_TAG : " ${{ inputs.rc_tag || github.event_name == 'pull_request' && 'apache-arrow-20.0.0-rc0' || github.ref_name }}"
4241
4342jobs :
43+ target :
44+ runs-on : ubuntu-latest
45+ timeout : 5
46+ outputs :
47+ version : ${{ steps.detect.outputs.version }}
48+ rc : ${{ steps.detect.outputs.rc }}
49+ steps :
50+ - name : Detect
51+ id : detect
52+ env :
53+ GH_TOKEN : ${{ github.token }}
54+ run : |
55+ case "${GITHUB_EVENT_NAME}" in
56+ workflow_dispatch)
57+ tag="${{ input.rc_tag }}"
58+ ;;
59+ pull_request)
60+ env | sort
61+ tag="$(gh release list \
62+ --jq '.[] | select(.isPrerelease) | .tagName' \
63+ --json tagName,isPrerelease \
64+ --repo ${GITHUB_REPOSITORY} | \
65+ head -n1)"
66+ ;;
67+ *)
68+ tag="${GITHUB_REF_NAME}"
69+ ;;
70+ esac
71+ package_id=${tag%-rc*}
72+ version=${package_id#apache-arrow-}
73+ rc=${tag#*-rc}
74+ echo "version=${version}" >> "${GITHUB_OUTPUT}"
75+ echo "rc=${rc}" >> "${GITHUB_OUTPUT}"
76+
4477 apt :
78+ needs : target
4579 name : APT
4680 runs-on : ${{ matrix.runs-on }}
4781 timeout-minutes : 30
@@ -52,30 +86,35 @@ jobs:
5286 - ubuntu-latest
5387 - ubuntu-24.04-arm
5488 env :
89+ RC : ${{ needs.target.outputs.rc }}
5590 TEST_APT : " 1"
91+ VERSION : ${{ needs.target.outputs.version }}
5692 steps :
5793 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5894 - name : Run
5995 run : |
60- package_id=${RC_TAG%-rc*}
61- version=${package_id#apache-arrow-}
62- rc=${RC_TAG#*-rc}
63- dev/release/verify-release-candidate.sh ${version} ${rc}
96+ dev/release/verify-release-candidate.sh ${VERSION} ${RC}
97+ - name : Verify the previous version
98+ run : |
99+ major_version=${VERSION%%.*}
100+ previous_major_version$((major_version - 1))
101+ previous_version=${previous_major_version}.0.0
102+ rc=0 # This number isn't used for APT verification
103+ dev/release/verify-release-candidate.sh ${previous_version} ${rc}
64104
65105 binary :
66106 name : Binary
67107 runs-on : ubuntu-latest
68108 timeout-minutes : 30
69109 env :
110+ RC : ${{ needs.target.outputs.rc }}
70111 TEST_BINARY : " 1"
112+ VERSION : ${{ needs.target.outputs.version }}
71113 steps :
72114 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
73115 - name : Run
74116 run : |
75- package_id=${RC_TAG%-rc*}
76- version=${package_id#apache-arrow-}
77- rc=${RC_TAG#*-rc}
78- dev/release/verify-release-candidate.sh ${version} ${rc}
117+ dev/release/verify-release-candidate.sh ${VERSION} ${RC}
79118
80119 wheels-linux :
81120 name : Wheels Linux
90129 - ubuntu-22.04
91130 - ubuntu-24.04
92131 env :
132+ RC : ${{ needs.target.outputs.rc }}
93133 TEST_WHEELS : " 1"
134+ VERSION : ${{ needs.target.outputs.version }}
94135 steps :
95136 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
96137 - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
@@ -100,9 +141,6 @@ jobs:
100141 run : python -m pip install -e dev/archery[docker]
101142 - name : Prepare
102143 run : |
103- package_id=${RC_TAG%-rc*}
104- echo "VERSION=${package_id#apache-arrow-}" >> ${GITHUB_ENV}
105- echo "RC=${RC_TAG#*-rc}" >> ${GITHUB_ENV}
106144 distro=${{ matrix.distro }}
107145 if [ "${distro}" = "conda" ]; then
108146 echo "SERVICE=${distro}-verify-rc" >> ${GITHUB_ENV}
@@ -136,35 +174,30 @@ jobs:
136174 - macos-13
137175 - macos-14
138176 env :
177+ RC : ${{ needs.target.outputs.rc }}
139178 TEST_WHEELS : " 1"
179+ VERSION : ${{ needs.target.outputs.version }}
140180 steps :
141181 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
142182 - name : Run
143183 env :
144184 GH_TOKEN : ${{ github.token }}
145185 run : |
146- package_id=${RC_TAG%-rc*}
147- version=${package_id#apache-arrow-}
148- rc=${RC_TAG#*-rc}
149- dev/release/verify-release-candidate.sh ${version} ${rc}
186+ dev/release/verify-release-candidate.sh ${VERSION} ${RC}
150187
151188 wheels-windows :
152189 name : Wheels Windows
153190 runs-on : windows-latest
154191 timeout-minutes : 45
155192 env :
156193 PYARROW_TEST_GDB : " OFF"
194+ RC : ${{ needs.target.outputs.rc }}
157195 TEST_WHEELS : " 1"
196+ VERSION : ${{ needs.target.outputs.version }}
158197 steps :
159198 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
160199 with :
161200 submodules : recursive
162- - name : Prepare
163- shell : bash
164- run : |
165- package_id=${RC_TAG%-rc*}
166- echo "VERSION=${package_id#apache-arrow-}" >> ${GITHUB_ENV}
167- echo "RC=${RC_TAG#*-rc}" >> ${GITHUB_ENV}
168201 - uses : conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
169202 - name : Install System Dependencies
170203 run : |
@@ -191,12 +224,18 @@ jobs:
191224 - ubuntu-latest
192225 - ubuntu-24.04-arm
193226 env :
227+ RC : ${{ needs.target.outputs.rc }}
194228 TEST_YUM : " 1"
229+ VERSION : ${{ needs.target.outputs.version }}
195230 steps :
196231 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
197232 - name : Run
198233 run : |
199- package_id=${RC_TAG%-rc*}
200- version=${package_id#apache-arrow-}
201- rc=${RC_TAG#*-rc}
202- dev/release/verify-release-candidate.sh ${version} ${rc}
234+ dev/release/verify-release-candidate.sh ${VERSION} ${RC}
235+ - name : Verify the previous version
236+ run : |
237+ major_version=${VERSION%%.*}
238+ previous_major_version$((major_version - 1))
239+ previous_version=${previous_major_version}.0.0
240+ rc=0 # This number isn't used for Yum verification
241+ dev/release/verify-release-candidate.sh ${previous_version} ${rc}
0 commit comments