name: Package build test

on:
  push:
    branches:
      - develop
      - master
      - release-*.*
  pull_request:
    branches:
      - develop
      - release-*.*

jobs:
  rpmbuild:
    name: "f${{ matrix.dist }}"
    runs-on: ubuntu-latest
    container: registry.fedoraproject.org/fedora:${{ matrix.dist }}
    strategy:
      matrix:
        dist: [32, 33]

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

      - run: bash contrib/ci/build-rpm.sh

      - name: Archive distribution artifacts
        uses: actions/upload-artifact@v2
        with:
          name: build-artifacts
          path: dist/
