generated from alleyinteractive/create-wordpress-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 99ccfc3
Showing
50 changed files
with
29,768 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.DS_Store | ||
.github | ||
.phpcs | ||
.phpcs.xml | ||
.phpunit.result.cache | ||
.scaffolder | ||
.scoper | ||
*.sql | ||
*.tar.gz | ||
*.zip | ||
bin | ||
composer.lock | ||
configure.php | ||
DOCKER_ENV | ||
Dockerfile | ||
Makefile | ||
node_modules/ | ||
output.log | ||
phpunit.xml | ||
phpunit.xml | ||
tests | ||
tests | ||
Thumbs.db | ||
wp-cli.local.yml |
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,18 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[*.{ts,tsx,js,jsx,scss,css,json,yaml,yml,feature,xml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# Dotfiles | ||
[.*] | ||
indent_style = space | ||
indent_size = 2 |
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,2 @@ | ||
build | ||
vendor |
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,6 @@ | ||
{ | ||
"extends": ["@alleyinteractive/eslint-config/typescript-react"], | ||
"parserOptions": { | ||
"project": "./tsconfig.eslint.json" | ||
} | ||
} |
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 @@ | ||
# | ||
# Exclude these files from release archives. | ||
# | ||
# This will also make the files unavailable when using Composer with `--prefer-dist`. | ||
# | ||
# Via WPCS. | ||
# | ||
/.github export-ignore | ||
/.phpcs.xml export-ignore | ||
/.phpcs export-ignore | ||
/phpunit.xml export-ignore | ||
/tests export-ignore | ||
/configure.php export-ignore | ||
/Makefile export-ignore | ||
|
||
# | ||
# Auto detect text files and perform LF normalization. | ||
# | ||
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ | ||
# | ||
* text=auto | ||
|
||
# | ||
# The above will handle all files not found below. | ||
# | ||
*.md text | ||
*.php text | ||
*.inc text |
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,25 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
|
||
- package-ecosystem: "composer" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
|
||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "saturday" | ||
time: "09:00" | ||
timezone: "America/New_York" | ||
ignore: | ||
- dependency-name: "@wordpress/*" |
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,67 @@ | ||
name: "All Pull Request Tests" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
# We use a single job to ensure that all steps run in the same environment and | ||
# reduce the number of minutes used. | ||
pr-tests: | ||
# Don't run on draft PRs | ||
if: github.event.pull_request.draft == false | ||
# Timeout after 10 minutes | ||
timeout-minutes: 10 | ||
# Define a matrix of PHP/WordPress versions to test against | ||
strategy: | ||
matrix: | ||
php: [8.2, 8.3] | ||
wordpress: ["latest"] | ||
runs-on: ubuntu-latest | ||
# Cancel any existing runs of this workflow | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}-P${{ matrix.php }}-WP${{ matrix.wordpress }} | ||
cancel-in-progress: true | ||
# Name the job in the matrix | ||
name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }}" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run General Tests | ||
# See https://github.com/alleyinteractive/action-test-general for more options | ||
uses: alleyinteractive/action-test-general@develop | ||
|
||
- name: Run Node Tests | ||
# See https://github.com/alleyinteractive/action-test-node for more options. | ||
# Defaults to the latest LTS version. | ||
uses: alleyinteractive/action-test-node@develop | ||
|
||
- name: Run PHP Tests | ||
# See https://github.com/alleyinteractive/action-test-php for more options | ||
uses: alleyinteractive/action-test-php@develop | ||
with: | ||
php-version: '${{ matrix.php }}' | ||
wordpress-version: '${{ matrix.wordpress }}' | ||
skip-wordpress-install: 'true' | ||
# This required job ensures that all PR checks have passed before merging. | ||
all-pr-checks-passed: | ||
name: All PR checks passed | ||
needs: | ||
- pr-tests | ||
runs-on: ubuntu-latest | ||
if: always() | ||
steps: | ||
- name: Check job statuses | ||
run: | | ||
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then | ||
echo "One or more jobs failed" | ||
exit 1 | ||
elif [[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then | ||
echo "One or more jobs were cancelled" | ||
exit 1 | ||
else | ||
echo "All jobs passed or were skipped" | ||
exit 0 | ||
fi |
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,19 @@ | ||
name: Built Branch and Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
- production | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: "Built Branch and Release" | ||
runs-on: ubuntu-latest | ||
if: github.repository != 'alleyinteractive/create-wordpress-plugin' | ||
steps: | ||
- uses: alleyinteractive/action-release@develop |
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,11 @@ | ||
name: dependabot-auto-approve | ||
on: | ||
pull_request: | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
dependabot: | ||
uses: alleyinteractive/.github/.github/workflows/dependabot-auto-approve.yml@main |
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,10 @@ | ||
name: dependabot-auto-merge | ||
on: pull_request_target | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
dependabot: | ||
uses: alleyinteractive/.github/.github/workflows/dependabot-auto-merge.yml@main |
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,40 @@ | ||
# This workflow is used on alleyinteractive/create-wordpress-plugin to merge the | ||
# develop branch into the scaffold branch and is NOT meant to be used on other | ||
# repositories. This workflow will be deleted automatically when the | ||
# configuration script is run. | ||
|
||
name: Merge Develop to Scaffold Branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- remove-scaffold | ||
|
||
jobs: | ||
merge-develop-to-scaffold: | ||
name: merge develop to scaffold | ||
if: ${{ github.repository == 'alleyinteractive/create-wordpress-plugin' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Merge develop to scaffold | ||
shell: bash | ||
env: | ||
DEVELOP_BRANCH: develop | ||
SCAFFOLD_BRANCH: scaffold | ||
|
||
TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: | | ||
git config --global user.name "$GITHUB_ACTOR" | ||
git config --global user.email "[email protected]" | ||
echo "Cloning alleyinteractive/create-wordpress-plugin..." | ||
git clone --recursive --quiet https://[email protected]/alleyinteractive/create-wordpress-plugin.git create-wordpress-plugin -b $SCAFFOLD_BRANCH | ||
cd create-wordpress-plugin | ||
git fetch origin $DEVELOP_BRANCH | ||
git fetch origin $SCAFFOLD_BRANCH | ||
git merge origin/$DEVELOP_BRANCH --no-edit | ||
git push -u origin $SCAFFOLD_BRANCH |
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: "Update Changelog" | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
|
||
- name: Update Changelog | ||
uses: stefanzweifel/changelog-updater-action@v1 | ||
with: | ||
latest-version: ${{ github.event.release.name }} | ||
release-notes: ${{ github.event.release.body }} | ||
|
||
- name: Commit updated CHANGELOG | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
branch: main | ||
commit_message: Update CHANGELOG | ||
file_pattern: CHANGELOG.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,19 @@ | ||
name: Update WordPress Plugin | ||
|
||
on: | ||
schedule: | ||
- cron: '0 6 1 * *' # Run on the first day of every month at 6am UTC. | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
update-plugin: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: alleyinteractive/[email protected] | ||
with: | ||
plugin-file: 'plugin.php' | ||
upgrade-npm-dependencies: "true" |
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,26 @@ | ||
# Build files | ||
build | ||
vendor | ||
composer.lock | ||
node_modules | ||
|
||
# Log files | ||
*.log | ||
|
||
# Cache files | ||
.phpcs/*.json | ||
.phpunit.result.cache | ||
|
||
# Ignore temporary OS files | ||
.DS_Store | ||
.DS_Store? | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
.thumbsdb | ||
|
||
# IDE files | ||
*.code-workspace | ||
.idea | ||
.vscode |
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 @@ | ||
legacy-peer-deps=true |
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 @@ | ||
22 |
Oops, something went wrong.