Skip to content

Commit 72b8d76

Browse files
authored
Merge pull request #318 from pantheon-systems/release
[SITE-5253] Update `main`
2 parents b2a9b9f + 7bd9c84 commit 72b8d76

18 files changed

+883
-573
lines changed

.circleci/config.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,6 @@ workflows:
1414
- master
1515
jobs:
1616
- test-behat
17-
commands:
18-
run_test:
19-
steps:
20-
- run:
21-
name: "Run Tests"
22-
command: |
23-
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
24-
composer phpunit
25-
WP_MULTISITE=1 composer phpunit
26-
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
27-
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
28-
composer phpunit
29-
bash bin/full-teardown-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
30-
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
31-
vendor/bin/phpunit --group=cli_command
32-
WP_MULTISITE=1 vendor/bin/phpunit --group=cli_command
33-
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
34-
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
35-
vendor/bin/phpunit --group=cli_command
3617
jobs:
3718
test-behat:
3819
resource_class: small
@@ -81,4 +62,3 @@ jobs:
8162
- run:
8263
command: ./bin/behat-cleanup.sh
8364
when: always
84-

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
/package.json export-ignore
2626
/phpcs.xml.dist export-ignore
2727
/phpunit.xml.dist export-ignore
28-
/README.md export-ignore
28+
/README.md export-ignore
29+
/catalog-info.yml export-ignore

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ updates:
2525
day: tuesday
2626
target-branch: "develop"
2727
open-pull-requests-limit: 99
28+
- package-ecosystem: github-actions
29+
directory: "/"
30+
schedule:
31+
interval: weekly
32+
timezone: America/Los_Angeles
33+
day: tuesday
34+
target-branch: "develop"
35+
open-pull-requests-limit: 99
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build, Tag and Release
2+
on:
3+
push:
4+
branches:
5+
- release
6+
7+
permissions:
8+
pull-requests: write
9+
contents: write
10+
11+
jobs:
12+
check-status:
13+
name: Check Status
14+
runs-on: ubuntu-latest
15+
outputs:
16+
is-plugin-update: ${{ steps.set-outputs.outputs.is-plugin-update }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
- id: get-changed-files
20+
uses: jitterbit/get-changed-files@v1
21+
- id: set-outputs
22+
shell: bash
23+
run: |
24+
echo "Changed files: ${{ steps.get-changed-files.outputs.all }}"
25+
shopt -s nocasematch
26+
run_plugin_update="false"
27+
for file in ${{ steps.get-changed-files.outputs.all }}; do
28+
echo "Checking if file '$file' should trigger a plugin release"
29+
if [[ "$file" == .github/* ]] || \
30+
[[ "$file" == .wordpress.org/* ]]; then
31+
echo "'$file' is inside an ignored directory."
32+
continue
33+
fi
34+
if [[ "$file" != readme.* ]] && \
35+
[[ "$file" != .gitattributes ]] && \
36+
[[ "$file" != .gitignore ]] && \
37+
[[ "$file" != catalog-info.yml ]] && \
38+
[[ "$file" != *composer* ]]; then
39+
echo "'$file' is not an ignored file."
40+
run_plugin_update="true"
41+
break
42+
fi
43+
done
44+
echo "is-plugin-update=${run_plugin_update}" >> $GITHUB_OUTPUT
45+
asset-only:
46+
name: WP.org Asset Only Update
47+
needs: check-status
48+
if: ${{ needs.check-status.outputs.is-plugin-update == 'false' }}
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
- name: WP.org Asset Only Update
53+
uses: 10up/action-wordpress-plugin-asset-update@stable
54+
env:
55+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
56+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
57+
tag:
58+
needs: check-status
59+
if: ${{ needs.check-status.outputs.is-plugin-update == 'true' }}
60+
name: Create Tag and Draft Release
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
- name: Build, Tag & Release
65+
uses: pantheon-systems/plugin-release-actions/build-tag-release@main
66+
with:
67+
gh_token: ${{ github.token }}
68+
readme_md: README.md
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Composer Diff
2+
on:
3+
pull_request:
4+
paths:
5+
- 'composer.lock'
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
composer-diff:
11+
name: Composer Diff
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- name: Generate composer diff
19+
id: composer_diff
20+
uses: IonBazan/composer-diff-action@v1
21+
- uses: marocchino/sticky-pull-request-comment@v2
22+
if: ${{ steps.composer_diff.outputs.composer_diff_exit_code != 0 }}
23+
with:
24+
header: composer-diff
25+
message: |
26+
<strong>Composer Changes</strong>
27+
28+
${{ steps.composer_diff.outputs.composer_diff }}

.github/workflows/lint-test.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11
name: Linting & Test
2-
on: [push]
2+
permissions:
3+
contents: read
4+
on:
5+
schedule:
6+
- cron: '0 0 * * *'
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
12+
- ready_for_review
13+
branches:
14+
- '**'
15+
316
jobs:
417
validate-readme-spacing:
518
name: Validate README Spacing
619
runs-on: ubuntu-latest
720
steps:
821
- name: Checkout
9-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
1023
- uses: pantheon-systems/validate-readme-spacing@v1
1124
lint:
1225
name: PHPCS Linting
1326
runs-on: ubuntu-latest
1427
steps:
1528
- name: Checkout
16-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
1730
- name: Cache dependencies
1831
uses: actions/cache@v3
1932
with:
@@ -33,17 +46,17 @@ jobs:
3346
runs-on: ubuntu-latest
3447
steps:
3548
- name: Checkout
36-
uses: actions/checkout@v3
49+
uses: actions/checkout@v4
3750
- uses: pantheon-systems/phpcompatibility-action@dev
3851
with:
3952
paths: ${{ github.workspace }}/*.php ${{ github.workspace }}/inc/*.php
40-
test-versions: 8.0-
53+
test-versions: 8.3-
4154
wporg-validation:
4255
name: WP.org Plugin Validation
4356
runs-on: ubuntu-latest
4457
steps:
4558
- name: Checkout
46-
uses: actions/checkout@v3
59+
uses: actions/checkout@v4
4760
- uses: pantheon-systems/action-wporg-validator@1.0.0
4861
with:
4962
type: 'plugin'
@@ -54,13 +67,11 @@ jobs:
5467
services:
5568
mariadb:
5669
image: mariadb:10.6
57-
env:
58-
MYSQL_ROOT_PASSWORD: ""
5970
strategy:
6071
matrix:
6172
php_version: [7.4, 8.2, 8.3, 8.4]
6273
steps:
63-
- uses: actions/checkout@v3
74+
- uses: actions/checkout@v4
6475
- name: Setup PHP
6576
uses: shivammathur/setup-php@v2
6677
with:
@@ -83,9 +94,12 @@ jobs:
8394
path: ~/vendor
8495
key: test-dependencies-{{ checksum "composer.json" }}
8596
restore-keys: test-dependencies-{{ checksum "composer.json" }}
97+
- name: Setup WP-CLI
98+
uses: godaddy-wordpress/setup-wp-cli@1
8699
- name: Install dependencies
87100
run: |
88101
if [ ${{ matrix.php_version }} = "7.4" ]; then
102+
composer require pantheon-systems/pantheon-wp-coding-standards:^2 --no-update
89103
composer update
90104
fi
91105
composer install

.github/workflows/release-pr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Draft Release PR
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
7+
permissions:
8+
pull-requests: write
9+
contents: write
10+
11+
jobs:
12+
draft-release:
13+
name: Draft Release PR
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Create Draft Release PR
18+
uses: pantheon-systems/plugin-release-actions/release-pr@main
19+
with:
20+
gh_token: ${{ github.token }}
21+
readme_md: README.md

.github/workflows/shellcheck.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/wordpress-plugin-deploy.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ jobs:
77
release:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v4
11+
- name: Install Subversion
12+
run: |
13+
sudo apt-get update
14+
sudo apt-get install subversion
15+
svn --version
1116
- name: WordPress Plugin Deploy
1217
uses: 10up/action-wordpress-plugin-deploy@2.1.1
1318
env:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ vendor/
77
bin/install-local-tests.sh
88
bin/install-wp-tests.sh
99
bin/phpunit-test.sh
10+
bin/helpers.sh

0 commit comments

Comments
 (0)