
name: Build
on:
  push:
    branches:
      - master
    
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: '11'
      
      - name: Run tests
        shell: bash
        run: |
          ant -noinput -buildfile build.xml testall
          
      - name: Build artifacts
        shell: bash
        run: |
          ant -noinput -buildfile build.xml nightly-release

      - uses: "marvinpinto/action-automatic-releases@latest"
        with:
          repo_token: "${{ secrets.GITHUB_TOKEN }}"
          automatic_release_tag: "latest"
          prerelease: true
          title: "Development Build"
          files: |
            dist/releases/*
