name: Builds
on:
  push:
    branches:
      - main
      - production
  pull_request:
    branches:
      - main
      - production
  schedule:
    - cron: '0 2 * * *' # Daily at 2AM UTC

jobs:
  builds:
    name: Builds
    runs-on: ubuntu-latest

    steps:
      - name: Clone repository
        uses: actions/checkout@v3

      - name: Create the package
        shell: bash
        run: |
          ./bin/build-addon.sh nightly.xpi

      - name: Uploading
        uses: actions/upload-artifact@v3
        with:
            name: ${{matrix.config.name}} Build
            path: src/web-ext-artifacts
