name: Debian Packaging

on:
  push:
  pull_request:
  schedule:
    - cron: '0 8 * * *'

jobs:
  build-deb-bookworm:
    runs-on: ubuntu-latest
    name: Debian pipeline for bookworm

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

    - name: Execute Docker debpkg action
      uses: ./.github/actions/debpkg-bookworm

    - name: Store Debian package artifacts
      uses: actions/upload-artifact@v4
      with:
        name: Debian binary package files for bookworm
        path: '*.deb'

    - name: Store Debian package build info
      uses: actions/upload-artifact@v4
      with:
        name: Debian buildinfo file for bookworm
        path: '*.buildinfo'

  build-deb-sid:
    runs-on: ubuntu-latest
    name: Debian pipeline for sid

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

    - name: Execute Docker debpkg action
      uses: ./.github/actions/debpkg-sid

    - name: Store Debian package artifacts
      uses: actions/upload-artifact@v4
      with:
        name: Debian binary package files for sid
        path: '*.deb'

    - name: Store Debian package build info
      uses: actions/upload-artifact@v4
      with:
        name: Debian buildinfo file for sid
        path: '*.buildinfo'
