name: Cooperate Cleaner Build

on:
  push:
    branches:
      - '**'

jobs:
  build-app:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 'node' # Use latest version
          npm-version: 'latest'

      - name: Set up NeutralinoJS CLI
        run: npm i -g @neutralinojs/neu

      - name: Update NeutralinoJS CLI (prepare build)
        run: neu update

      - name: Build app
        run: neu build

      - name: Upload Artifact
        uses: actions/upload-artifact@v3
        with:
          name: cooperate-cleaner-executables
          path: dist/clearapp/*
