Skip to content
Draft
Changes from 7 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
53 changes: 49 additions & 4 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:

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

Expand Down Expand Up @@ -187,7 +187,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 @@ -251,7 +251,52 @@ 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@v3
Comment thread
swissspidy marked this conversation as resolved.
Resolved
with:
name: cli_version

- name: Download built Phar file
uses: actions/download-artifact@v3
Comment thread
swissspidy marked this conversation as resolved.
Resolved
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 }}
branch: gh-pages
Comment thread
swissspidy marked this conversation as resolved.
Resolved
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' }}
Expand Down Expand Up @@ -305,7 +350,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' }}
Expand Down