Skip to content
Open
Show file tree
Hide file tree
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
46 changes: 21 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ jobs:
name: Update version
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write

steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history so we can access tags and commits
fetch-tags: true # Ensure tags are fetched

- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v5
with:
version: 10

- name: Install Node.js LTS
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: "pnpm"
Expand All @@ -41,7 +43,7 @@ jobs:
php-version: "latest"

- name: Install Composer
uses: ramsey/composer-install@v3
uses: ramsey/composer-install@v4

- name: Downgrade PHP code to the minimum version WordPress requires
run: vendor/bin/rector --ansi
Expand Down Expand Up @@ -69,19 +71,6 @@ jobs:
# Push changes, handling potential conflicts
git push || git pull --rebase origin ${{ github.ref_name }} && git push

- name: Create release
id: release
if: steps.script.outputs.has-changed == 'true'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.script.outputs.stable-tag }}
release_name: ${{ steps.script.outputs.release-name }}
body: ${{ steps.script.outputs.release-body }}
draft: false
prerelease: false

- name: WordPress Plugin Deploy
if: steps.script.outputs.has-changed == 'true'
id: deploy
Expand All @@ -95,13 +84,20 @@ jobs:
VERSION: ${{ steps.script.outputs.stable-tag }}
ASSETS_DIR: assets

- name: Upload release asset
- name: Name release zip like repository
if: steps.script.outputs.has-changed == 'true'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: release_zip
run: |
cp "${{ steps.deploy.outputs.zip-path }}" "${{ github.workspace }}/${{ github.event.repository.name }}.zip"
echo "path=${{ github.workspace }}/${{ github.event.repository.name }}.zip" >> "$GITHUB_OUTPUT"

- name: Create GitHub release
if: steps.script.outputs.has-changed == 'true'
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ${{ steps.deploy.outputs.zip-path }}
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
tag_name: ${{ steps.script.outputs.stable-tag }}
name: ${{ steps.script.outputs.release-name }}
body: ${{ steps.script.outputs.release-body }}
draft: false
prerelease: false
files: ${{ steps.release_zip.outputs.path }}
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
mysql -h 127.0.0.1 -uroot -proot -D wordpress -e "SHOW TABLES;" || echo "No tables found (yet)."

- name: Checkout plugin
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false

Expand All @@ -65,7 +65,7 @@ jobs:

- name: Cache WordPress archive
id: cache-wordpress
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: /tmp/wp
key: wp-${{ matrix.wordpress }}
Expand All @@ -79,11 +79,11 @@ jobs:
rm wordpress-${WP_VERSION}.tar.gz

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Build FrankenPHP image (with cache)
id: build
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
env:
DOCKER_BUILD_SUMMARY: false
with:
Expand Down Expand Up @@ -158,12 +158,12 @@ jobs:
curl -s -o /dev/null -w "homepage: HTTP %{http_code} in %{time_total}s\n" http://localhost:8100/

- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v5
with:
version: 10

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: "pnpm"
Expand All @@ -175,7 +175,7 @@ jobs:
run: npx playwright install --with-deps

- name: Cache composer dependencies
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
Expand All @@ -188,7 +188,7 @@ jobs:

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: test-results-php${{ matrix.php }}-wp${{ matrix.wordpress }}
path: tests/Browser/Screenshots
Expand Down