-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.81 KB
/
on-release-add.zip.yml
File metadata and controls
55 lines (48 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: On Release, Build release zip
on:
release:
types: [published]
jobs:
build:
name: Build release zip
runs-on: ubuntu-latest
env:
PLUGIN_ZIP: your-plugin-slug.zip
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build plugin
run: |
composer install --no-dev --optimize-autoloader
- name: Archive Release
uses: thedoctor0/zip-release@b57d897cb5d60cb78b51a507f63fa184cfe35554 #0.7.6
with:
type: 'zip'
filename: ${{ env.PLUGIN_ZIP }}
exclusions: >-
*.git* /*.github/* /*.vscode/* /*node_modules/* /*tests/* /*docs/*
composer.json composer.lock package.json package-lock.json
phpunit.xml phpunit.xml.dist phpcs.xml vitest.config.js i18n-map.json
.editorconfig .eslintignore .phpunit.result.cache .eslintrc.js .gitignore .gitattributes
*.log CHANGELOG.md README.md
!readme.txt !src/* !vendor/*
- name: Verify Archive Contents
run: |
echo "Listing $PLUGIN_ZIP entries:"
unzip -l "$PLUGIN_ZIP" || { echo "Failed to list zip contents"; exit 1; }
echo "Total files: $(unzip -l "$PLUGIN_ZIP" | awk 'END{print $2}')"
if unzip -l "$PLUGIN_ZIP" | grep -q "vendor/yahnis-elsts/plugin-update-checker"; then
echo "Plugin Update Checker is included"
else
echo "ERROR: Plugin Update Checker is missing from the release"
exit 1
fi
- name: Release
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda #v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ env.PLUGIN_ZIP }}
tag_name: ${{ github.event.release.tag_name }}