File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments