Skip to content

Commit

Permalink
Update workflow for release
Browse files Browse the repository at this point in the history
  • Loading branch information
fxzxmicah committed Oct 26, 2024
1 parent 1e97a8b commit 45cd85d
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Build RPM
on:
- push

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -20,15 +23,25 @@ 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 &&
mv RPMS rpms &&
grep -i '^version' SPECS/*.spec | awk '{print \"Driver Ver: \" \$NF}' >> release.log &&
rpm -q --qf 'Kernel Ver: %{VERSION}-%{RELEASE}\n' kernel-devel >> release.log
"
- name: Set Variables
id: vars
run: |
echo "version=$(grep -i '^kernel' release.log | awk '{print $NF}')" >> $GITHUB_OUTPUT
- 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: ${{ steps.vars.outputs.version }}
body_path: release.log
files: rpms/*

0 comments on commit 45cd85d

Please sign in to comment.