on:
  workflow_dispatch:
  push:
    branches:
      - devel
  pull_request:
    types:
      - opened
      - reopened
      - synchronize

name: Create Packages (Emscripten)

jobs:
  build:
    name: "build"
    runs-on: ubuntu-24.04
    if: (github.repository_owner == 'dosemu2' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false))
    steps:
    - uses: actions/checkout@v6
    - name: Setup Emscripten
      uses: emscripten-core/setup-emsdk@v16

    - name: Verify Emscripten installation
      run: emcc --version

    - name: Build project
      run: |
        mkdir build
        cd build
        ../configure-emsdk ../default-configure
        make
