Skip to content

Bundle App

Bundle App #36

Workflow file for this run

name: Bundle App
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-user-guide:
uses: mbsantiago/whombat/.github/workflows/build_user_guide.yml@dev
build-frontend:
uses: mbsantiago/whombat/.github/workflows/build_frontend.yml@dev
build-app:
name: "Bundle App"
needs: [build-user-guide, build-frontend]
strategy:
fail-fast: false
matrix:
python-version:
- "3.12"
os:
- ubuntu-20.04
- windows-latest
- macos-12
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up uv
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-12' }}
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up uv
if: ${{ matrix.os == 'windows-latest' }}
run: irm https://astral.sh/uv/install.ps1 | iex
shell: powershell
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Retrieve built frontend
uses: actions/download-artifact@v4
with:
name: frontend
path: back/src/whombat/statics/
- name: Retrieve built user guide
uses: actions/download-artifact@v4
with:
name: user_guide
path: back/src/whombat/user_guide/
- name: Bundle app (Windows)
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: |
scripts/bundle_windows.ps1
mv "dist\whombat.zip" "dist\whombat-${{ matrix.os }}-${{ github.ref_name }}.zip"
- name: Bundle app (Linux/macOS)
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-12' }}
run: |
bash scripts/bundle_linux.sh
mv dist/whombat.zip "dist/whombat-${{ matrix.os }}-${{ github.ref_name }}.zip"
# Only run if triggered by user
- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
name: "${{ matrix.os }}-${{ github.ref_name }}" # Include ref_name for better organization
path: "dist/whombat-${{ matrix.os }}-${{ github.ref_name }}.zip"
# Only run if release
- name: Upload release
if: ${{ github.event_name == 'release' }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "dist/whombat-${{ matrix.os }}-${{ github.ref_name }}.zip"