-
Notifications
You must be signed in to change notification settings - Fork 32
44 lines (37 loc) · 1.24 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
41
42
43
44
name: Create zip file
on: workflow_dispatch
jobs:
tag:
name: New zip file
runs-on: ubuntu-latest
env:
SLUG: "hcaptcha-for-forms-and-more"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies with caching
uses: kagg-design/composer-install@v2
with:
composer-options: "--no-dev --optimize-autoloader --classmap-authoritative"
- name: Install packages
run: |
corepack enable
yarn set version stable
yarn
yarn prod
- name: Create zip file
run: |
echo "➤ Copying files..."
rsync -rc --exclude-from="$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded
echo "➤ Generating zip file..."
cd trunk
zip -r "${{github.workspace}}/${{ env.SLUG }}.zip" .
echo "zip-path=${GITHUB_WORKSPACE}/${SLUG}.zip" >> "${GITHUB_OUTPUT}"
echo "✓ Zip file generated!"
- name: Upload release asset
uses: softprops/action-gh-release@v2
with:
files: ${{github.workspace}}/${{ env.SLUG }}.zip
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}