Skip to content

Commit c98a17c

Browse files
committed
chore: rescaffold plugin
1 parent d3397a4 commit c98a17c

38 files changed

+31381
-39084
lines changed

.editorconfig

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
14
# WordPress Coding Standards
2-
# https://make.wordpress.org/core/handbook/coding-standards/
5+
# https://developer.wordpress.org/coding-standards/wordpress-coding-standards/
36

47
root = true
58

@@ -10,9 +13,19 @@ insert_final_newline = true
1013
trim_trailing_whitespace = true
1114
indent_style = tab
1215

13-
[{.babelrc,.eslintrc,.rtlcssrc,*.json,*.yml}]
14-
indent_style = space
16+
[*.json]
1517
indent_size = 2
1618

1719
[*.md]
18-
trim_trailing_whitespace = false
20+
trim_trailing_whitespace = false
21+
indent_style = space
22+
indent_size = 2
23+
24+
[*.txt]
25+
trim_trailing_whitespace = false
26+
27+
[*.{yml,yaml}]
28+
insert_final_newline = false
29+
quote_type = single
30+
indent_style = space
31+
indent_size = 2

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
**/*.min.js
22
**/node_modules/**
33
**/vendor/**
4-
build/*
4+
**/build/**

.eslintrc renamed to .eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
// Add Rules for Jest here
3333
}
3434
} ]
35-
}
35+
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ If you can't do everything, that's okay too.
4949
- [ ] My code passes all lints (ESLint etc.).
5050
- [ ] My code has detailed inline documentation.
5151
- [ ] I have updated the project documentation as needed.
52-
- [ ] I have added a changeset for this PR using `npm run changeset`.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16+
copilot-setup-steps:
17+
runs-on: ubuntu-latest
18+
19+
permissions:
20+
contents: read
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
25+
with:
26+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
27+
persist-credentials: false
28+
29+
##
30+
# This allows Composer dependencies to be installed using a single step.
31+
#
32+
# Since the tests are currently run within the Docker containers where the PHP version varies,
33+
# the same PHP version needs to be configured for the action runner machine so that the correct
34+
# dependency versions are installed and cached.
35+
##
36+
- name: Set up PHP
37+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
38+
with:
39+
php-version: "8.3"
40+
coverage: none
41+
42+
- name: Install Composer dependencies
43+
uses: ramsey/composer-install@a2636af0004d1c0499ffca16ac0b4cc94df70565 # v3.1.0
44+
45+
- name: Setup Node
46+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5.0.0
47+
with:
48+
cache: "npm"
49+
node-version-file: ".nvmrc"
50+
51+
- name: Install NPM dependencies
52+
run: npm ci
53+
env:
54+
CI: true
55+
56+
- name: Build assets for development
57+
run: npm run build:dev

.github/workflows/phpcs_on_pull_request.yml

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

.github/workflows/release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Upload Package on Release
2+
3+
# Cancels all previous workflow runs for pull requests that have not completed.
4+
concurrency:
5+
# The concurrency group contains the workflow name and the branch name for pull requests
6+
# or the commit hash for any other events.
7+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
8+
cancel-in-progress: true
9+
10+
on:
11+
release:
12+
types: [published]
13+
14+
jobs:
15+
tag:
16+
name: Upload New Release
17+
runs-on: ubuntu-24.04
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
22+
with:
23+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
24+
persist-credentials: false
25+
26+
- name: Set up PHP
27+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
28+
with:
29+
php-version: "8.3"
30+
coverage: none
31+
tools: composer:v2
32+
33+
- name: Install Composer dependencies
34+
uses: ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 # v3.1.1
35+
36+
- name: Setup Node
37+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5.0.0
38+
with:
39+
cache: "npm"
40+
node-version-file: ".nvmrc"
41+
42+
- name: Install NPM dependencies
43+
run: npm ci
44+
env:
45+
CI: true
46+
47+
- name: Build JavaScript assets
48+
run: npm run build
49+
50+
- name: Create Artifact
51+
run: |
52+
npm run plugin-zip
53+
54+
- name: Upload artifact
55+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
56+
with:
57+
name: onedesign
58+
path: onedesign.zip
59+
60+
- name: Upload release asset
61+
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
62+
with:
63+
files: onedesign.zip
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release_on_tag.yml

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

0 commit comments

Comments
 (0)