name: "Upload zip-archive"
on:
  release:
    types: [published]

jobs:
  zip-archive:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4.1.7
        with:
          submodules: true
      - name: Create zip including submodules
        run: |
          cd ..
          zip ${{ github.event.repository.name }}/${{ github.event.repository.name }}-${{ github.ref_name }}.zip ${{ github.event.repository.name }} -r
      - name: Upload zip to release
        uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
        with:
          files: |
            ${{ github.event.repository.name }}-${{ github.ref_name }}.zip