Skip to content

Commit b561a3f

Browse files
justlevineCopilotgithub-advanced-security[bot]up1512001
authored
chore: rescaffold plugin (#27)
* chore: rescaffold plugin * Update onedesign.php Co-authored-by: Copilot <[email protected]> * Update docs/DEVELOPMENT.md Co-authored-by: Copilot <[email protected]> * Potential fix for code scanning alert no. 9: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 8: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update .github/workflows/release.yml Co-authored-by: Utsav Patel <[email protected]> * dev: simplify Composer commands * ci: fix phpstan command call --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Utsav Patel <[email protected]>
1 parent d3397a4 commit b561a3f

38 files changed

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