Skip to content

1.2.2

1.2.2 #6

name: Build release zip
on:
workflow_dispatch:
release:
types: [published]
jobs:
build_zip:
name: New release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: |
composer install --no-dev
composer build-zip
rm -rf ./release && unzip ${{ github.event.repository.name }}.zip -d ./release
- name: Upload the ZIP file as an artifact
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}
path: release
retention-days: 5
- name: Upload release asset
if: ${{ github.event_name == 'release' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{github.workspace}}/${{ github.event.repository.name }}.zip
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip