name: Build Legacy Debug APK

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - '*'

jobs:
  build:
    runs-on: ubuntu-latest

    if: "!contains(github.event.head_commit.message, '[ci skip]')"

    steps:

    - name: Check out code
      uses: actions/checkout@v3
    - uses: actions/setup-go@v5
      with: 
        go-version-file: 'go.mod'
    - name: Switch to Java 17 # Note: 17 is pre-installed on ubuntu-latest
      uses: actions/setup-java@v3
      with:
        distribution: 'temurin'
        java-version: '17'

    - name: Build Legacy APK
      run: make tailscale-debug.apk
