-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #303 from pantheon-systems/release-automation-only
Apply release CI to the "release" branch
- Loading branch information
Showing
11 changed files
with
514 additions
and
363 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build, Tag and Release | ||
on: | ||
push: | ||
branches: | ||
- release | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
check-status: | ||
name: Check Status | ||
runs-on: ubuntu-latest | ||
outputs: | ||
is-asset-update: ${{ steps.set-outputs.outputs.is-asset-update }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: get-changed-files | ||
uses: jitterbit/get-changed-files@v1 | ||
- id: set-outputs | ||
run: | | ||
echo "Changed files: ${{ steps.get-changed-files.outputs.all }}" | ||
shopt -s nocasematch | ||
run_plugin_update="true" | ||
for file in ${{ steps.get-changed-files.outputs.all }}; do | ||
if | ||
[[ ! "$file" =~ ^\.wordpress\.org/ ]] && \ | ||
[[ ! $file =~ ^\.github/ ]] && \ | ||
[[ "$file" != "readme.txt" ]] && \ | ||
[[ $file != "readme.md" ]] && \ | ||
[[ $file != ".gitignore" ]] && \ | ||
[[ $file != *"composer"* ]]; then | ||
run_plugin_update="false" | ||
break | ||
fi | ||
done | ||
echo "::set-output name=is-asset-update::$run_plugin_update" | ||
asset-only: | ||
name: WP.org Asset Only Update | ||
needs: check-status | ||
if: ${{ needs.check-status.outputs.is-asset-update == 'true' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: WP.org Asset Only Update | ||
uses: 10up/action-wordpress-plugin-asset-update@stable | ||
env: | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
tag: | ||
needs: check-status | ||
if: ${{ needs.check-status.outputs.is-asset-update == 'false' }} | ||
name: Create Tag and Draft Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build, Tag & Release | ||
uses: pantheon-systems/plugin-release-actions/build-tag-release@main | ||
with: | ||
gh_token: ${{ github.token }} | ||
readme_md: README.md |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Composer Diff | ||
on: | ||
pull_request: | ||
paths: | ||
- 'composer.lock' | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
jobs: | ||
composer-diff: | ||
name: Composer Diff | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Generate composer diff | ||
id: composer_diff | ||
uses: IonBazan/composer-diff-action@v1 | ||
- uses: marocchino/sticky-pull-request-comment@v2 | ||
if: ${{ steps.composer_diff.outputs.composer_diff_exit_code != 0 }} | ||
with: | ||
header: composer-diff | ||
message: | | ||
<strong>Composer Changes</strong> | ||
${{ steps.composer_diff.outputs.composer_diff }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,30 @@ | ||
name: Linting & Test | ||
on: [push] | ||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
validate-readme-spacing: | ||
name: Validate README Spacing | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- uses: pantheon-systems/validate-readme-spacing@v1 | ||
lint: | ||
name: PHPCS Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -33,17 +44,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- uses: pantheon-systems/phpcompatibility-action@dev | ||
with: | ||
paths: ${{ github.workspace }}/*.php ${{ github.workspace }}/inc/*.php | ||
test-versions: 8.0- | ||
test-versions: 8.3- | ||
wporg-validation: | ||
name: WP.org Plugin Validation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- uses: pantheon-systems/[email protected] | ||
with: | ||
type: 'plugin' | ||
|
@@ -53,12 +64,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
services: | ||
mariadb: | ||
image: mariadb:10.5 | ||
image: mariadb:10.6 | ||
strategy: | ||
matrix: | ||
php_version: [7.4, 8.2, 8.3] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
|
@@ -72,6 +83,8 @@ jobs: | |
path: ~/vendor | ||
key: test-dependencies-{{ checksum "composer.json" }} | ||
restore-keys: test-dependencies-{{ checksum "composer.json" }} | ||
- name: Setup WP-CLI | ||
uses: godaddy-wordpress/setup-wp-cli@1 | ||
- name: Install dependencies | ||
run: | | ||
if [ ${{ matrix.php_version }} = "7.4" ]; then | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Draft Release PR | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
draft-release: | ||
name: Draft Release PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create Draft Release PR | ||
uses: pantheon-systems/plugin-release-actions/release-pr@main | ||
with: | ||
gh_token: ${{ github.token }} | ||
readme_md: README.md |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ vendor/ | |
bin/install-local-tests.sh | ||
bin/install-wp-tests.sh | ||
bin/phpunit-test.sh | ||
bin/helpers.sh |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.