Skip to content

Create zip file

Create zip file #10

Workflow file for this run

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 }}