name: Build QMK firmware

on: [push, workflow_dispatch]

permissions:
  contents: write

jobs:
  build:
    name: 'QMK Userspace Build'
    uses: qmk/.github/.github/workflows/qmk_userspace_build.yml@main
    with:
      qmk_repo: qmk/qmk_firmware
      qmk_ref: master

  publish:
    name: 'QMK Userspace Publish'
    uses: qmk/.github/.github/workflows/qmk_userspace_publish.yml@main
    if: always() && !cancelled()
    needs: build
