Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,57 @@ jobs:
branch: gh-pages
repository: wp-cli/builds

deploy-shim: #-----------------------------------------------------------------------
name: Deployment (Composer shim)
runs-on: ubuntu-latest
needs: [build, test]

if: ${{ github.repository_owner == 'wp-cli' && github.event_name != 'workflow_dispatch' }}
steps:
- name: Check out shim repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: wp-cli/wp-cli-shim
token: ${{ secrets.ACTIONS_BOT }}

- parallel:
- name: Download WP-CLI version
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: cli_version

- name: Download built Phar file
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: wp-cli-phar

- name: Move built Phar file into correct location
run: |
mv wp-cli.phar wp

- name: Make built Phar executable
run: |
chmod +x wp

- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add wp
git commit -m "phar build: $GITHUB_REPOSITORY@$GITHUB_SHA"

- name: Tag stable release
if: ${{ contains(github.ref, 'release') }}
run: git tag "v$(head -n 1 cli_version.txt)"

- name: Push changes
uses: ad-m/github-push-action@881a6320fdb16eb5318c5054f31c218aec2b324c # v1
with:
github_token: ${{ secrets.ACTIONS_BOT }}
branch: main
tags: true
repository: wp-cli/wp-cli-shim

build-rpm: #-----------------------------------------------------------------------
name: Build RPM package
runs-on: ubuntu-latest
Expand Down