name: Build Flutter Web and Docker Image for Local Registry

on:
  push:
    branches:
      - master

jobs:
  build:
    name: Build React Native Web App
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'

      - name: Install Dependencies
        run: npm install

      - name: Install Expo
        run:  |
          npx expo install expo@latest
          npx expo install --fix

      - name: Build
        run: npx expo export --platform web

      - name: Package Release Files
        run: tar -czvf release.tar.gz -C ./dist .

      - name: Create Release
        uses: akkuman/gitea-release-action@v1
        with:
          files: |-
            ./release.tar.gz

