Skip to content

Commit 7893dfa

Browse files
Shukriclaude
authored andcommitted
ci: build and upload plugin ZIP on every push to main
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 203bdeb commit 7893dfa

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build Plugin ZIP
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
zip:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Read plugin version
16+
id: version
17+
run: |
18+
VERSION=$(grep -m1 "^ \* Version:" devpulse.php | awk '{print $3}')
19+
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
20+
21+
- name: Build ZIP
22+
run: |
23+
mkdir -p dist/devpulse
24+
rsync -r \
25+
--exclude='.git' \
26+
--exclude='.github' \
27+
--exclude='.gitattributes' \
28+
--exclude='.gitignore' \
29+
--exclude='composer.json' \
30+
--exclude='composer.lock' \
31+
--exclude='vendor' \
32+
--exclude='README.md' \
33+
--exclude='dist' \
34+
. dist/devpulse/
35+
cd dist
36+
zip -r "devpulse-${{ steps.version.outputs.version }}.zip" devpulse/
37+
echo "Built devpulse-${{ steps.version.outputs.version }}.zip"
38+
unzip -l "devpulse-${{ steps.version.outputs.version }}.zip"
39+
40+
- name: Upload artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: devpulse-${{ steps.version.outputs.version }}
44+
path: dist/devpulse-${{ steps.version.outputs.version }}.zip
45+
retention-days: 90

0 commit comments

Comments
 (0)