-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.32 KB
/
Copy pathrelease.yml
File metadata and controls
44 lines (37 loc) · 1.32 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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring, gd
tools: composer:v2
coverage: none
- name: Install runtime dependencies
# --no-dev keeps PHPUnit etc. out of the shipped zip; the committed
# composer.lock makes the install reproducible.
run: composer install --no-dev --optimize-autoloader --no-interaction --no-progress
- name: Build plugin zip
# git archive honors the export-ignore rules in .gitattributes (drops docs,
# tests, CI config, etc.); we then fold in the installed vendor/ so the zip is
# upload-and-activate (mPDF included). Unzips to a wc-pricebook/ folder.
run: |
mkdir -p build
git archive --format=tar --prefix=wc-pricebook/ HEAD | tar -x -C build
cp -R vendor build/wc-pricebook/vendor
(cd build && zip -qr "../wc-pricebook-${GITHUB_REF_NAME}.zip" wc-pricebook)
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
files: wc-pricebook-*.zip
generate_release_notes: true