name: Release Build

on:
  push:
    tags:
      - 'v*'

jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v3
      
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '18'
          cache: 'npm'
          
      - name: Install dependencies
        run: npm ci
        
      - name: Build app
        run: |
          npm run build
          
      - name: Create Release
        uses: softprops/action-gh-release@v1
        with:
          files: |
            android/app/build/outputs/apk/release/*.apk
          body_path: ALPHA_BUILD_2_ANNOUNCEMENT.md
          draft: true
          prerelease: true
          generate_release_notes: true 