Skip to content

Commit da731d2

Browse files
committed
fix(ci): use predictable RPM filename for upload
RPMs were not uploading to GitHub Release because rpmbuild produces files with unpredictable dist-tag in the name (e.g., rouser-1.1.0-1.fc43.x86_64.rpm). Renamed after build to match DEB naming convention (rouser-{version}-{arch}.rpm) so upload step can reference directly.
1 parent 213b55d commit da731d2

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

.github/scripts/rpm.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,12 @@ for rpm_file in "${RPMTOP}/RPMS/${ARCH}/"*.rpm; do
8888
done
8989

9090
rm -rf "${SOURCE_NAME}"
91+
92+
for f in rouser-${RPM_VERSION}-*.rpm; do
93+
if [ -f "$f" ]; then
94+
new_name=$(echo "$f" | sed "s/rouser-${RPM_VERSION}-[^-]*-\(.*\)\.rpm/rouser-${RPM_VERSION}-\1.rpm/")
95+
mv -- "$f" "$new_name" 2>/dev/null || true
96+
fi
97+
done
98+
9199
echo "Built RPM for $ARCH (version $RPM_VERSION)"

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,15 @@ jobs:
318318
run: |
319319
gh release view "${VERSION}" >/dev/null 2>&1 || exit 0
320320
RPM_VERSION=$(echo "${VERSION}" | sed 's/^v//')
321-
rpm_file=$(find . -maxdepth 2 -name "rouser-${RPM_VERSION}-*.rpm" 2>/dev/null | head -1)
322-
if [ -n "$rpm_file" ]; then
321+
# Use same approach as DEB upload — direct filename with arch suffix
322+
rpm_file="rouser-${RPM_VERSION}-${{ matrix.rpm_arch }}.rpm"
323+
if [ -f "$rpm_file" ]; then
323324
gh release upload "${VERSION}" "$rpm_file" --clobber
324325
else
325-
echo "No RPM file found for ${{ matrix.rpm_arch }}" >&2
326-
ls -R *.rpm 2>/dev/null || true
326+
echo "DEBUG: Looking for RPM file..." >&2
327+
find . -name "*.rpm" 2>/dev/null || true
328+
ls -la *.rpm 2>&1 || true
329+
exit 1
327330
fi
328331
329332
- name: Upload GHA artifact (RPM backup)

0 commit comments

Comments
 (0)