generated from cloudmaker97/JTL-Plugin-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.42 KB
/
build_webpack.yml
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
name: Build Webpack
on:
workflow_dispatch:
push:
tags:
env:
PLUGIN_NAME: dh_matomo_tracking
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup_node
uses: actions/setup-node@v3
with:
node-version: 'latest'
- name: npm_install
working-directory: ./frontend/webpack
run: npm install
- name: build_webpack
working-directory: ./frontend/webpack
run: npm run build
- name: node_cleanup
working-directory: ./frontend/webpack
run: rm -rf node_modules
- name: composer_install
uses: php-actions/composer@v6
with:
php_version: '8.0'
version: latest
- name: version
id: get_version
uses: michmich112/extract-version@main
with:
version-file: info.xml
schema: major.minor.build
- name: zip
run: |
mkdir temp_dir
rm .git -rf
find . -type f -not -path '*/temp_dir/*' -exec cp --parents '{}' './temp_dir/' \;
mv temp_dir ${{ env.PLUGIN_NAME }}
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./${{ env.PLUGIN_NAME }}.zip