name: Release Apps

outputs:
  sdk_version:
    description: 'Common SDK version shared by all bundled apps'
    value: ${{ steps.release.outputs.sdk_version }}

runs:
  using: 'composite'
  steps:
    - name: 'Download app artifacts'
      uses: actions/download-artifact@v4
      with:
        path: downloaded_apps
    - name: Copy apps to cdn_files/
      run: rsync -av downloaded_apps/*/*.app cdn_files/
      shell: bash
    - name: 'Create CDN release files'
      id: release
      shell: bash
      run: |
        python release.py cdn_files/
        echo "sdk_version=$(cat sdk_version.txt)" >> "$GITHUB_OUTPUT"
    - name: 'Upload Artifact'
      uses: actions/upload-artifact@v4
      with:
        name: 'cdn-files'
        path: cdn_files/
        retention-days: 30
