# # Verify on CI/GHA that RPM package building works. # name: RPM Packaging on: # master - v1.x branch # apprise-v2-release - v2.x branch push: branches: [main, master, apprise-v1-release, 'release/**'] pull_request: branches: [main, master, apprise-v1-release] workflow_dispatch: jobs: build: name: Build RPMs (${{ matrix.dist }}) runs-on: ubuntu-latest strategy: fail-fast: false matrix: dist: [el9, el10] container: image: ghcr.io/caronc/apprise-rpmbuild:${{ matrix.dist }} options: --user root steps: - name: Checkout source uses: actions/checkout@v7 - name: Build RPMs run: ./bin/build-rpm.sh env: APPRISE_DIR: ${{ github.workspace }} # Drop RPMs into dist/ inside the workspace DIST_DIR: ${{ github.workspace }}/dist/${{ matrix.dist }} - name: Show RPMs found for upload run: | echo "Listing dist/${{ matrix.dist }}/**/*.rpm:" find dist/${{ matrix.dist }} -type f -name '*.rpm' - name: Upload RPM Artifacts uses: actions/upload-artifact@v7 with: name: built-rpms-${{ matrix.dist }} path: ./dist/${{ matrix.dist }} if-no-files-found: error retention-days: 5 - name: Upload rpmlint config files uses: actions/upload-artifact@v7 with: # Upload the specific files needed for verification name: rpmlint-config-${{ matrix.dist }} path: ./packaging/redhat/python-apprise.rpmlintrc.${{ matrix.dist }} retention-days: 5 verify: name: Verify RPMs (${{ matrix.dist }}) needs: build runs-on: ubuntu-latest strategy: fail-fast: false matrix: dist: [el9, el10] container: image: ghcr.io/caronc/apprise-rpmbuild:${{ matrix.dist }} options: --user root steps: - name: Download built RPMs uses: actions/download-artifact@v8 with: name: built-rpms-${{ matrix.dist }} path: ./dist - name: Download rpmlint config files uses: actions/download-artifact@v8 with: name: rpmlint-config-${{ matrix.dist }} # Download files directly into the correct directory path: ./packaging/redhat - name: Lint RPMs run: | set -e RC_FILE="./packaging/redhat/python-apprise.rpmlintrc.${{ matrix.dist }}" if rpmlint --help 2>&1 | grep -q -- '--rpmlintrc'; then echo "Using rpmlint --rpmlintrc with $RC_FILE" rpmlint --rpmlintrc "$RC_FILE" ./dist/**/*.rpm else echo "Using rpmlint v1.x on older distribution" rpmlint -f "$RC_FILE" ./dist/**/*.rpm fi - name: Install and verify RPMs run: | echo "Installing RPMs from: ./dist/" find ./dist -name '*.rpm' dnf install -y ./dist/**/*.rpm apprise --version - name: Check Installed Files run: rpm -qlp ./dist/**/*.rpm