Generate stubs #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate stubs | |
on: workflow_dispatch | |
env: | |
php-version: '7.4' | |
jobs: | |
generate-stubs: | |
name: Generate stubs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
ini-file: development | |
php-version: ${{ env.php-version }} | |
- name: Install dependencies | |
run: composer install --no-interaction --no-progress --prefer-dist | |
- name: Generate stubs | |
run: | | |
./generate.sh # Generate stubs | |
- name: Commit file | |
run: | | |
git config --local user.name "GitHub Actions" | |
git config --local user.email "[email protected]" | |
git add wordpress-stubs.php | |
git commit -m "Update WordPress stubs" || exit 0 | |
git push origin ${{ github.ref_name }} |