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
52 changes: 48 additions & 4 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:

build: #---------------------------------------------------------------------
build: #----------------------------------------------------------------------
Comment thread
swissspidy marked this conversation as resolved.
name: Build Phar
runs-on: ubuntu-latest

Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
WP_VERSION: '${{ matrix.wp }}'
run: composer behat || composer behat-rerun

deploy: #-----------------------------------------------------------------------
deploy: #---------------------------------------------------------------------
name: Deployment
runs-on: ubuntu-latest
needs: [build, test]
Expand Down Expand Up @@ -259,7 +259,51 @@ jobs:
branch: gh-pages
repository: wp-cli/builds

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

if: ${{ github.repository_owner == 'wp-cli' }}
steps:
- name: Check out phar repository
uses: actions/checkout@v4
with:
repository: wp-cli/wp-cli-shim
token: ${{ secrets.ACTIONS_BOT }}

- name: Download WP-CLI version
uses: actions/download-artifact@v7
with:
name: cli_version

- name: Download built Phar file
uses: actions/download-artifact@v7
with:
name: 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@master
with:
github_token: ${{ secrets.ACTIONS_BOT }}
repository: wp-cli/wp-cli-shim

build-rpm: #------------------------------------------------------------------
name: Build RPM package
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'release') && github.repository_owner == 'wp-cli' && github.event_name != 'workflow_dispatch' }}
Expand Down Expand Up @@ -313,7 +357,7 @@ jobs:
branch: gh-pages
repository: wp-cli/builds

build-deb: #-----------------------------------------------------------------------
build-deb: #------------------------------------------------------------------
name: Build DEB package
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'release') && github.repository_owner == 'wp-cli' && github.event_name != 'workflow_dispatch' }}
Expand Down
Loading