Skip to content

Commit

Permalink
Move downgrade logic into its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
Bellangelo committed Sep 27, 2024
1 parent d7749dd commit 43c8894
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
21 changes: 21 additions & 0 deletions .github/actions/downgrade/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Downgrade PHP 8.3 to PHP 7.4

runs:
using: composite

steps:
- uses: actions/checkout@v2

- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
coverage: none

- uses: ramsey/composer-install@v2

# downgrade /src to PHP 7.4
- run: vendor/bin/rector process src bin --config build/rector-downgrade-php-74.php --ansi

# copy PHP 7.4 composer
- run: cp build/composer-php-74.json composer.json
- run: cp build/composer-php-74.lock composer.lock
16 changes: 1 addition & 15 deletions .github/workflows/downgrade-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
coverage: none

- uses: ramsey/composer-install@v2

# downgrade /src to PHP 7.4
- run: vendor/bin/rector process src bin --config build/rector-downgrade-php-74.php --ansi

# copy PHP 7.4 composer
- run: cp build/composer-php-74.json composer.json
- run: cp build/composer-php-74.lock composer.lock
- uses: ./.github/actions/downgrade

# clear the dev files
- run: find . ! -name 'bin' ! -name 'src' ! -name 'vendor' ! -name 'composer.json' ! -name 'composer.lock' ! -name 'README.md' -mindepth 1 -delete
Expand Down

0 comments on commit 43c8894

Please sign in to comment.