Skip to content

Build and Release (Desktop and Mobile) #31

Build and Release (Desktop and Mobile)

Build and Release (Desktop and Mobile) #31

name: Build and Release (Desktop and Mobile)
on: [workflow_dispatch]
jobs:
# Skipping self-hosted ARM build for the sake of universla binary built on Intel macOS runner
# self-hosted:
# name: Run self-hosted
# uses: ./.github/workflows/build_macos_arm_sh.yaml
gh-hosted:
name: Run GitHub-hosted
uses: ./.github/workflows/build_wlma_binaries_ghh.yaml
secrets: inherit
pre-release:
name: Create release
# needs: [self-hosted, gh-hosted]
needs: [gh-hosted]
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
# - name: Display structure of downloaded files
# run: ls -R
- name: Prepare artifacts for uploading
run: |
folders=$(find . -maxdepth 1 -type d ! -name .)
mkdir _output
for folder in $folders; do
subfolders=$(find "$folder/." -mindepth 1 -maxdepth 1 -type d ! -name .)
if [ -n "$subfolders" ]; then
zip -r "$folder".zip "$folder"
cp "$folder".zip ./_output
rm "$folder".zip
else
files=$(find "$folder" -maxdepth 1 -type f)
if [ -n "$files" ]; then
cp "$folder"/* ./_output
fi
fi
done
- name: Release draft
uses: softprops/action-gh-release@v1
with:
files: _output/*
tag_name: ${{ needs.gh-hosted.outputs.version }}
draft: true