name: Builds Application

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

jobs:
  build:
    name: Builds Application
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: cachix/install-nix-action@v19
        with:
          github_access_token: ${{ secrets.GITHUB_TOKEN }}
      - name: Build Backend
        run: nix develop --command make
      - name: Install NPM Packages
        run: nix develop --command npm install
      - name: Build Frontend
        run: nix develop --command npm run tauri build
