From b6983063f966c46294f900072a191e8b08aeaca3 Mon Sep 17 00:00:00 2001 From: Fxzx micah <48860358+fxzxmicah@users.noreply.github.com> Date: Sat, 26 Oct 2024 20:02:58 +0800 Subject: [PATCH] Update workflow for release --- .github/workflows/main.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a4c06cb..0dbe8ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,15 +20,19 @@ jobs: dnf install -y dnf-plugins-core rpmdevtools && spectool --get-files --directory=SOURCES --all SPECS/*.spec && dnf builddep -y SPECS/*.spec && - rpmbuild --define '_topdir /workspace' -ba SPECS/*.spec + rpmbuild --define '_topdir /workspace' -ba SPECS/*.spec && + grep -i "^version" SPECS/*.spec | awk '{print "Driver Ver: " $2}' >> release.log && + rpm -q --qf "Kernel Ver: %{VERSION}-%{RELEASE}\n" kernel-devel >> release.log " - name: Check run: | ls -l BUILD/* + cat release.log - - name: Upload Artifact - uses: actions/upload-artifact@v4 + - name: Create Release + uses: softprops/action-gh-release@v2 with: - name: rpm-package - path: RPMS/ + tag_name: ${{ github.sha }} + body_path: release.log + files: RPMS/*