-
Notifications
You must be signed in to change notification settings - Fork 44
40 lines (36 loc) · 1.37 KB
/
create_zip.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
name: Create module ZIP
on:
workflow_dispatch:
jobs:
prepare-zip:
name: Prepare module ZIP artifact
runs-on: ubuntu-latest
env:
MODULE_NAME: mollie
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build module ZIP
run: |
composer install --no-dev --optimize-autoloader --classmap-authoritative
composer dump-autoload --no-dev --optimize --classmap-authoritative
cp .github/.htaccess vendor/.htaccess
rm -rf .git .docker .editorconfig .github tests .php-cs-fixer.php Makefile cypress .docker cypress.config.js cypress.env.json docker-compose*.yml .gitignore bin codeception.yml package-lock.json package.json .php_cs.dist .php-cs-fixer.dist .php-cs-fixer.dist.php
mv .env.dist .env
mkdir ${{ env.MODULE_NAME }}
rsync -Rr ./ ./${{ env.MODULE_NAME }}
shopt -s extglob
rm -r !(${{ env.MODULE_NAME }})
find . -maxdepth 1 -type f -exec rm "{}" \;
cd ${{ env.MODULE_NAME }} && rm -rf ${{ env.MODULE_NAME }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.MODULE_NAME }}
path: ./