43 lines
1002 B
YAML
43 lines
1002 B
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:20-alpine
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install PHP and zip
|
|
run: apk add --no-cache php82 zip
|
|
|
|
- name: PHP syntax check
|
|
run: |
|
|
find . -name "*.php" -not -path "./.git/*" -print0 \
|
|
| xargs -0 -n1 php -l
|
|
|
|
- name: Build ZIP
|
|
run: |
|
|
MODULE=simple_withdrawalbutton
|
|
mkdir -p dist/$MODULE
|
|
cp -rp . dist/$MODULE
|
|
rm -rf dist/$MODULE/.git \
|
|
dist/$MODULE/.gitea \
|
|
dist/$MODULE/dist \
|
|
dist/$MODULE/CLAUDE.md
|
|
cd dist
|
|
zip -r ${MODULE}.zip $MODULE/
|
|
echo "Built dist/${MODULE}.zip"
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: simple_withdrawalbutton
|
|
path: dist/simple_withdrawalbutton.zip
|
|
if-no-files-found: error
|