Skip to content

Commit 097838b

Browse files
authored
Update pecl.yml
1 parent 98439b6 commit 097838b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/pecl.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ jobs:
167167
# Artifact name uses original extension name and ref with 'v'
168168
artifact_name="php_${extension_original}-${ref}-${php_version}-${ts}-${vs_version}-${arch}.zip"
169169
artifact_name_modern="php_${extension}-${ref}-${php_version}-${ts}-${vs_version}-${arch}.zip"
170+
final_name="${artifact_name}"
170171
# Release uses new extension name and ref without 'v'
171172
release_tag="${extension}-${ref_clean}"
172173
release_asset_name="php_${extension}-${ref_clean}-${php_version}-${ts}-${vs_version}-${arch}.zip"
@@ -176,7 +177,8 @@ jobs:
176177
177178
if [ -z "$artifact_id" ]; then
178179
artifact_id=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts \
179-
--jq ".artifacts[] | select(.name==\"${artifact_name_modern}\") | .id")
180+
--jq ".artifacts[] | select(.name==\"${artifact_name_modern}\") | .id")
181+
final_name="${artifact_name_modern}"
180182
if [ -z "$artifact_id" ]; then
181183
echo "Artifact ${artifact_name} not found"
182184
exit 1
@@ -192,9 +194,9 @@ jobs:
192194
unzip "artifact_wrapper.zip"
193195
194196
# Rename the artifact file to the new naming scheme
195-
if [ -f "${artifact_name}" ]; then
196-
if [ "${artifact_name}" != "${release_asset_name}" ]; then
197-
mv "${artifact_name}" "${release_asset_name}"
197+
if [ -f "${final_name}" ]; then
198+
if [ "${final_name}" != "${release_asset_name}" ]; then
199+
mv "${final_name}" "${release_asset_name}"
198200
fi
199201
fi
200202

0 commit comments

Comments
 (0)