Skip to content

Commit 6899235

Browse files
committed
1.4.0
Signed-off-by: Sascha Greuel <[email protected]>
1 parent 4121dbf commit 6899235

29 files changed

+1390
-2426
lines changed

.eslintignore

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

.eslintrc.js

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

.github/workflows/codestyle.yml

Lines changed: 76 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,90 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- "**.php"
9+
- "**.ts"
10+
- "**.scss"
711
pull_request:
12+
paths:
13+
- "**.php"
14+
- "**.ts"
15+
- "**.scss"
16+
17+
permissions:
18+
contents: read
819

920
jobs:
1021
php:
1122
name: PHP
1223
runs-on: ubuntu-latest
1324
steps:
14-
- uses: actions/checkout@v3
15-
- name: Setup PHP with tools
16-
uses: shivammathur/setup-php@v2
17-
with:
18-
php-version: '8.1'
19-
extensions: ctype, dom, exif, gd, gmp, hash, intl, json, libxml, mbstring, opcache, pcre, pdo, pdo_mysql, zlib
20-
tools: cs2pr, phpcs, php-cs-fixer
21-
- name: phpcs
22-
run: phpcs -n -q --report=checkstyle | cs2pr
23-
- name: php-cs-fixer
24-
run: php-cs-fixer fix --dry-run --diff
25+
- uses: actions/checkout@v4
26+
- name: Setup PHP with tools
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: "8.1"
30+
extensions: ctype, dom, exif, gd, gmp, hash, intl, json, libxml, mbstring, opcache, pcre, pdo, pdo_mysql, zlib
31+
tools: cs2pr, phpcs, php-cs-fixer
32+
- name: phpcs
33+
run: |
34+
sudo update-alternatives --set php /usr/bin/php8.1
35+
phpcs -n -q --report=checkstyle | cs2pr
36+
- name: php-cs-fixer
37+
run: php-cs-fixer fix --dry-run --diff
2538
ts:
2639
name: TS Prettier
2740
runs-on: ubuntu-latest
2841
steps:
29-
- uses: actions/checkout@v3
30-
- name: Set up node.js
31-
uses: actions/setup-node@v3
32-
with:
33-
node-version: "16"
34-
cache: "npm"
35-
- run: npm install
36-
- name: Run prettier
37-
run: |
38-
shopt -s globstar
39-
npx prettier -w ts/**/*.ts
40-
- run: echo "::add-matcher::.github/diff.json"
41-
- name: Show diff
42-
run: |
43-
git checkout -- package-lock.json
44-
git diff --exit-code
42+
- uses: actions/checkout@v4
43+
- name: Check for package.json
44+
id: check_files
45+
uses: andstor/file-existence-action@v3
46+
with:
47+
files: "package.json"
48+
- name: Set up node.js
49+
if: steps.check_files.outputs.files_exists == 'true'
50+
uses: actions/setup-node@v4
51+
with:
52+
node-version: "20"
53+
cache: "npm"
54+
- name: Run prettier
55+
if: steps.check_files.outputs.files_exists == 'true'
56+
run: |
57+
shopt -s globstar
58+
npx prettier --no-error-on-unmatched-pattern -w ts/**/*.ts
59+
- run: echo "::add-matcher::.github/diff.json"
60+
if: steps.check_files.outputs.files_exists == 'true'
61+
- name: Show diff
62+
if: steps.check_files.outputs.files_exists == 'true'
63+
run: |
64+
git checkout -- package-lock.json
65+
git diff --exit-code
66+
scss:
67+
name: SCSS Prettier
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v4
71+
- name: Check for package.json
72+
id: check_files
73+
uses: andstor/file-existence-action@v3
74+
with:
75+
files: "package.json"
76+
- name: Set up node.js
77+
if: steps.check_files.outputs.files_exists == 'true'
78+
uses: actions/setup-node@v4
79+
with:
80+
node-version: "20"
81+
cache: "npm"
82+
- name: Run prettier
83+
if: steps.check_files.outputs.files_exists == 'true'
84+
run: |
85+
shopt -s globstar
86+
npx prettier --no-error-on-unmatched-pattern -w files/style/**/*.scss
87+
- run: echo "::add-matcher::.github/diff.json"
88+
if: steps.check_files.outputs.files_exists == 'true'
89+
- name: Show diff
90+
if: steps.check_files.outputs.files_exists == 'true'
91+
run: |
92+
git checkout -- package-lock.json
93+
git diff --exit-code

.github/workflows/javascript.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- "**.js"
79
pull_request:
10+
paths:
11+
- "**.js"
12+
workflow_dispatch:
813

914
jobs:
1015
syntax:
@@ -13,17 +18,17 @@ jobs:
1318
strategy:
1419
fail-fast: false
1520
steps:
16-
- uses: actions/checkout@v3
17-
- name: Set up node.js
18-
uses: actions/setup-node@v3
19-
with:
20-
node-version: "16"
21-
- run: echo "::add-matcher::.github/javascript-syntax.json"
22-
- name: Remove files to be ignored
23-
run: |
24-
true
25-
- run: |
26-
! find . -type f -name '*.js' -exec node -c '{}' \; 2>&1 \
27-
|awk 'BEGIN {m=0} /(.js):[0-9]+$/ {m=1; printf "%s - ",$0} m==1 && /^SyntaxError/ { m=0; print }' \
28-
|sed "s@$(pwd)@.@" \
29-
|grep '^'
21+
- name: Set up node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: "20"
25+
- uses: actions/checkout@v4
26+
- run: echo "::add-matcher::.github/javascript-syntax.json"
27+
- name: Remove files to be ignored
28+
run: |
29+
true
30+
- run: |
31+
! find wcfsetup/ -type f -name '*.js' -exec node -c '{}' \; 2>&1 \
32+
|awk 'BEGIN {m=0} /(.js):[0-9]+$/ {m=1; printf "%s - ",$0} m==1 && /^SyntaxError/ { m=0; print }' \
33+
|sed "s@$(pwd)@.@" \
34+
|grep '^'

.github/workflows/php.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,17 @@ name: PHP
33
on:
44
push:
55
branches:
6-
- main
6+
- main
7+
tags-ignore:
8+
- "**"
9+
paths:
10+
- "**.php"
711
pull_request:
12+
paths:
13+
- "**.php"
14+
15+
permissions:
16+
contents: read
817

918
jobs:
1019
syntax:
@@ -14,18 +23,18 @@ jobs:
1423
fail-fast: false
1524
matrix:
1625
php:
17-
- '8.0'
18-
- '8.1'
19-
- '8.2'
26+
- "8.1"
27+
- "8.2"
28+
- "8.3"
2029
steps:
21-
- name: Set up PHP
22-
uses: shivammathur/setup-php@v2
23-
with:
24-
php-version: ${{ matrix.php }}
25-
- uses: actions/checkout@v3
26-
- run: echo "::add-matcher::.github/php-syntax.json"
27-
- name: Remove files to be ignored
28-
run: |
29-
true
30-
- run: |
31-
! find . -type f -name '*.php' -exec php -l '{}' \; 2>&1 |grep -v '^No syntax errors detected'
30+
- name: Set up PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
- uses: actions/checkout@v4
35+
- run: echo "::add-matcher::.github/php-syntax.json"
36+
- name: Remove files to be ignored
37+
run: |
38+
true
39+
- run: |
40+
! find . -type f -name '*.php' -exec php -l '{}' \; 2>&1 |grep -v '^No syntax errors detected'

.github/workflows/pull_request.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,34 @@ name: Pull Requests
33
on:
44
pull_request:
55
types:
6-
- opened
7-
- edited
8-
- reopened
9-
- synchronize
10-
- ready_for_review
11-
- review_requested
6+
- opened
7+
- edited
8+
- reopened
9+
- synchronize
10+
- ready_for_review
11+
- review_requested
1212

1313
jobs:
1414
commit_message:
1515
name: Check Commit Message
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Check for GitHub's default message.
19-
uses: gsactions/commit-message-checker@c61c81192182bbc0d5e41b4796e3b71684228c77
19+
uses: gsactions/commit-message-checker@v2
2020
with:
2121
pattern: '^(?!Update\s+\S*$).*$'
22-
error: 'Please use a meaningful commit message.'
23-
excludeDescription: 'true'
24-
excludeTitle: 'true'
25-
checkAllCommitMessages: 'true'
22+
error: "Please use a meaningful commit message."
23+
excludeDescription: "true"
24+
excludeTitle: "true"
25+
checkAllCommitMessages: "true"
2626
accessToken: ${{ secrets.GITHUB_TOKEN }}
2727
- name: Check for unsquashed `fixup!` commits.
2828
if: ${{ ! github.event.pull_request.draft }}
29-
uses: gsactions/commit-message-checker@c61c81192182bbc0d5e41b4796e3b71684228c77
29+
uses: gsactions/commit-message-checker@v2
3030
with:
3131
pattern: '^(?!fixup!(\s|$))'
32-
error: 'A `fixup!` commit was found.'
33-
excludeDescription: 'true'
34-
excludeTitle: 'true'
35-
checkAllCommitMessages: 'true'
32+
error: "A `fixup!` commit was found."
33+
excludeDescription: "true"
34+
excludeTitle: "true"
35+
checkAllCommitMessages: "true"
3636
accessToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,26 @@ jobs:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: write
13-
1413
steps:
15-
- uses: actions/checkout@v3
16-
17-
- uses: actions/setup-node@v3
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
1816
with:
19-
node-version: 16
20-
17+
node-version: "20"
2118
- name: Create package
2219
run: |
2320
rm -rf *.tar.gz
24-
npx --yes wspackager
25-
21+
npx --yes wspackager@latest
2622
- name: Check file existence
2723
id: check_files
28-
uses: andstor/file-existence-action@v1
24+
uses: andstor/file-existence-action@v3
2925
with:
30-
files: "${{ github.event.repository.name }}_*.tar.gz"
31-
26+
files: "*.tar.gz"
3227
- name: On Build Failure
3328
if: steps.check_files.outputs.files_exists == 'false'
3429
run: |
3530
echo "Packaging FAILED" && exit 1
36-
3731
- name: Release
3832
uses: softprops/action-gh-release@v1
3933
if: startsWith(github.ref, 'refs/tags/') && steps.check_files.outputs.files_exists == 'true'
4034
with:
41-
files: "${{ github.event.repository.name }}_*.tar.gz"
35+
files: "*.tar.gz"

0 commit comments

Comments
 (0)