Skip to content

Commit

Permalink
only build source rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
BlakeGardner committed Sep 25, 2024
1 parent 43ce0dd commit 8380140
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/rpm.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Build RPM Packages
name: Build SRPM for COPR

on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
workflow_dispatch:

jobs:
Expand All @@ -16,8 +16,7 @@ jobs:

# Run the job inside a Fedora container
container:
image: fedora:40
options: --privileged
image: fedora:38

steps:
# Checkout the repository
Expand All @@ -36,6 +35,9 @@ jobs:
# Install 'builddep' command for DNF
dnf install -y 'dnf-command(builddep)'
# Install spectool for downloading sources
dnf install -y spectool
# Set up RPM build environment
rpmdev-setuptree
Expand All @@ -62,19 +64,18 @@ jobs:
# Install packages required to build xremap
dnf builddep -y ~/rpmbuild/SPECS/xremap.spec
# Build the RPM Packages
- name: Build RPM Packages
# Build the SRPM
- name: Build the Source RPM (SRPM)
run: |
cd ~/rpmbuild/SPECS
# Build both source and binary RPMs
rpmbuild -ba xremap.spec
# Build the SRPM
rpmbuild -bs xremap.spec
# Upload RPM Packages as Artifacts
- name: Upload RPM Packages
# Upload SRPM as Artifact
- name: Upload SRPM
uses: actions/upload-artifact@v3
with:
name: rpm-packages
name: srpm
path: |
~/rpmbuild/RPMS/**/*.rpm
~/rpmbuild/SRPMS/*.rpm
~/rpmbuild/SRPMS/*.src.rpm

0 comments on commit 8380140

Please sign in to comment.