-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (57 loc) · 1.88 KB
/
release.yaml
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
56
57
58
59
60
61
62
63
64
name: Build release package
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
env:
WP_PLUGIN_NAME: smaily-for-woocommerce
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ${{ env.WP_PLUGIN_NAME }}
- name: Setup Composer caching
uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install Composer packages
uses: php-actions/composer@v5
with:
dev: no
working_dir: ${{ env.WP_PLUGIN_NAME }}
- name: Compress ZIP
uses: TheDoctor0/[email protected]
with:
filename: build.zip
path: ${{ env.WP_PLUGIN_NAME }}
exclusions: >
/${{ env.WP_PLUGIN_NAME }}/.git*
/${{ env.WP_PLUGIN_NAME }}/.vscode*
/${{ env.WP_PLUGIN_NAME }}/assets*
/${{ env.WP_PLUGIN_NAME }}/CHANGELOG.md
/${{ env.WP_PLUGIN_NAME }}/composer.json
/${{ env.WP_PLUGIN_NAME }}/composer.lock
/${{ env.WP_PLUGIN_NAME }}/CONTRIBUTING.md
/${{ env.WP_PLUGIN_NAME }}/docker-compose.yml
/${{ env.WP_PLUGIN_NAME }}/Dockerfile
/${{ env.WP_PLUGIN_NAME }}/lang/smaily.pot
/${{ env.WP_PLUGIN_NAME }}/phpcs.xml
/${{ env.WP_PLUGIN_NAME }}/README.md
/${{ env.WP_PLUGIN_NAME }}/release.sh
- name: Get release URL
id: get_release_url
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release assets
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_url.outputs.upload_url }}
asset_path: ./build.zip
asset_name: ${{ env.WP_PLUGIN_NAME }}.zip
asset_content_type: application/zip