Skip to content

Commit a2dcb34

Browse files
committed
Fix artifact handling in shim deployment job
The `deploy-shim` job downloaded an artifact named `wp`, but the build job uploads it as `wp-cli-phar` containing `wp-cli.phar`, so the download failed and the subsequent `chmod`/`git add` had no file to operate on. Download the correct artifact and rename the Phar to `wp`, which is what `wp-cli/wp-cli-shim` declares as its `bin`. Also align the job with the existing `deploy` job: * Give it a distinct display name, as both were labelled "Deployment". * Pin `actions/checkout`, `actions/download-artifact` and `ad-m/github-push-action` to the same SHAs used elsewhere in this workflow, instead of floating tags and `@master`. * Push to `main` explicitly. Without it the action defaults to the current ref, which would push to a branch named after the bundle's ref rather than the shim's default branch. * Push tags, so the "Tag stable release" step is no longer a no-op. * Skip on `workflow_dispatch`, matching `deploy`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RHtjyXkZh8X16sBgmidSQi
1 parent 2f2fcab commit a2dcb34

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

‎.github/workflows/deployment.yml‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,27 +260,31 @@ jobs:
260260
repository: wp-cli/builds
261261

262262
deploy-shim: #----------------------------------------------------------------
263-
name: Deployment
263+
name: Deployment (Composer shim)
264264
runs-on: ubuntu-latest
265265
needs: [build, test]
266266

267-
if: ${{ github.repository_owner == 'wp-cli' }}
267+
if: ${{ github.repository_owner == 'wp-cli' && github.event_name != 'workflow_dispatch' }}
268268
steps:
269-
- name: Check out phar repository
270-
uses: actions/checkout@v4
269+
- name: Check out shim repository
270+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
271271
with:
272272
repository: wp-cli/wp-cli-shim
273273
token: ${{ secrets.ACTIONS_BOT }}
274274

275275
- name: Download WP-CLI version
276-
uses: actions/download-artifact@v7
276+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
277277
with:
278278
name: cli_version
279279

280280
- name: Download built Phar file
281-
uses: actions/download-artifact@v7
281+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
282282
with:
283-
name: wp
283+
name: wp-cli-phar
284+
285+
- name: Move built Phar file into correct location
286+
run: |
287+
mv wp-cli.phar wp
284288
285289
- name: Make built Phar executable
286290
run: |
@@ -298,9 +302,11 @@ jobs:
298302
run: git tag "v$(head -n 1 cli_version.txt)"
299303

300304
- name: Push changes
301-
uses: ad-m/github-push-action@master
305+
uses: ad-m/github-push-action@881a6320fdb16eb5318c5054f31c218aec2b324c # v1
302306
with:
303307
github_token: ${{ secrets.ACTIONS_BOT }}
308+
branch: main
309+
tags: true
304310
repository: wp-cli/wp-cli-shim
305311

306312
build-rpm: #------------------------------------------------------------------

0 commit comments

Comments
 (0)