Skip to content

Commit 30e8d06

Browse files
committed
Reapply "Update pecl.yml"
This reverts commit d2450f3.
1 parent 8e1a109 commit 30e8d06

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

.github/workflows/pecl.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ jobs:
115115
116116
artifact_name="php_${extension}-${ref}-${php_version}-${ts}-${vs_version}-${arch}.zip"
117117
release_tag="${extension}-${ref}"
118-
119118
artifact_id=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts \
120119
--jq ".artifacts[] | select(.name==\"${artifact_name}\") | .id")
121120
@@ -128,24 +127,20 @@ jobs:
128127
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
129128
-H "Accept: application/vnd.github.v3+json" \
130129
"https://api.github.com/repos/${{ github.repository }}/actions/artifacts/${artifact_id}/zip" \
131-
-o artifact_wrapper.zip
132-
133-
<<<<<<< HEAD
134-
unzip -oq artifact_wrapper.zip
135-
=======
136-
New-Item -Path ".\$artifact_id" -ItemType Directory -Force | Out-Null
137-
unzip -oq artifact_wrapper.zip -d "./$artifact_id"
138-
>>>>>>> parent of d5b3e83 (Update pecl.yml)
130+
-o "artifact_wrapper.zip"
139131
140-
if ! gh release view "${release_tag}" -R ${{ github.repository }} >/dev/null 2>&1; then
141-
if ! gh release create "${release_tag}" php-* \
132+
unzip "artifact_wrapper.zip"
133+
134+
# Release by extension version
135+
release_tag="${extension}-${ref}"
136+
137+
# Create or update release
138+
if ! gh release view "${release_tag}" -R ${{ github.repository }}; then
139+
gh release create "${release_tag}" "${artifact_name}" \
142140
-t "${extension} ${ref}" \
143141
-n "Release of PECL extension '${extension}' version ${ref}" \
144-
-R ${{ github.repository }}; then
145-
gh release upload "${release_tag}" php-* \
146-
-R ${{ github.repository }} --clobber
147-
fi
142+
-R ${{ github.repository }}
148143
else
149-
gh release upload "${release_tag}" php-* \
144+
gh release upload "${release_tag}" "${artifact_name}" \
150145
-R ${{ github.repository }} --clobber
151146
fi

0 commit comments

Comments
 (0)